java-helidon.server.libraries.se.formParamsInitial.mustache Maven / Gradle / Ivy
The newest version!
{{#x-helidon-v3}}{{!
}}Map> nonFileFormContent = new HashMap<>();
Map> fileFormContent = new HashMap<>();
Single formSingle = request.content().asStream(ReadableBodyPart.class)
.forEach(part -> {
String name = part.name();{{#formParams}}
if ("{{baseName}}".equals(name)) {
{{^isFile}}processNonFileFormField(name, nonFileFormContent, part);{{/isFile}}{{!
}}{{#isFile}}processFileFormField(name, fileFormContent, part);{{/isFile}}
}{{/formParams}}
part.drain();
});
{{/x-helidon-v3}}{{!
}}{{^x-helidon-v3}}
{{^isMultipart}}{{#hasFormParams}}{{!
}} Parameters formParams = request.content().as(Parameters.class);
{{/hasFormParams}}{{/isMultipart}}{{!
}}{{#isMultipart}}{{!
}} Map parts = PartsUtils.partsMap(request);
{{/isMultipart}}{{/x-helidon-v3}}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy