use of io.undertow.server.handlers.form.FormData in project undertow by undertow-io.
the class MCMPHandler method parseFormData.
/**
* Transform the form data into an intermediate request data which can me used
* by the web manager
*
* @param exchange the http server exchange
* @return
* @throws IOException
*/
RequestData parseFormData(final HttpServerExchange exchange) throws IOException {
// Read post parameters
final FormDataParser parser = parserFactory.createParser(exchange);
final FormData formData = parser.parseBlocking();
final RequestData data = new RequestData();
for (String name : formData) {
final HttpString key = new HttpString(name);
data.add(key, formData.get(name));
}
return data;
}
Aggregations