File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
http-generator-nima/src/main/java/io/avaje/http/generator/helidon/nima Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ void writeHandler(boolean requestScoped) {
4141 writer .append (" private void _%s(ServerRequest req, ServerResponse res) {" , method .simpleName ()).eol ();
4242 final var bodyType = method .bodyType ();
4343 if (bodyType != null ) {
44- if (useJsonB ) {
44+
45+ if (bodyType .equals ("InputStream" )) {
46+ writer .append (" var %s = req.content().inputStream();" , method .bodyName ()).eol ();
47+ } else if (useJsonB ) {
4548 final var fieldName =
4649 method .params ().stream ()
4750 .filter (MethodParam ::isBody )
@@ -60,11 +63,6 @@ void writeHandler(boolean requestScoped) {
6063 final var type = param .utype ();
6164
6265 writer .append (" var %s = req.content()" , method .bodyName ());
63-
64- if (type .full ().startsWith ("java.io.InputStream" )) {
65- writer .append (".inputStream();" ).eol ();
66- return ;
67- }
6866 writer .append (".as(" );
6967 if (type .param0 () != null ) {
7068 writer .append ("new io.helidon.common.GenericType<%s>() {}" , type .full ());
You can’t perform that action at this time.
0 commit comments