Package io.helidon.webserver
Class FormParamsSupport
- java.lang.Object
-
- io.helidon.webserver.FormParamsSupport
-
- All Implemented Interfaces:
Handler,Service,BiConsumer<ServerRequest,ServerResponse>
public class FormParamsSupport extends Object implements Service, Handler
Provides support for form parameters in requests, adding a reader for URL-encoded text (if the request's media type so indicates) and also adding a reader forFormParams.Developers will typically add this support to routing:
Routing.builder() .register(FormParamSupport.create()) . ... // any other handlersWhen responding to a request, the developer can use
and use all the methods defined onrequest.content().as(FormParams.class).thenApply(fp -> ...)FormParams(which extendsParameters).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.helidon.webserver.Handler
Handler.EntityHandler<T>
-
-
Constructor Summary
Constructors Constructor Description FormParamsSupport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(ServerRequest req, ServerResponse res)static FormParamsSupportcreate()voidupdate(Routing.Rules rules)UpdatesRouting.Ruleswithhandlersrepresenting this service.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiConsumer
andThen
-
-
-
-
Method Detail
-
update
public void update(Routing.Rules rules)
Description copied from interface:ServiceUpdatesRouting.Ruleswithhandlersrepresenting this service.
-
accept
public void accept(ServerRequest req, ServerResponse res)
Description copied from interface:Handler- Specified by:
acceptin interfaceBiConsumer<ServerRequest,ServerResponse>- Specified by:
acceptin interfaceHandler- Parameters:
req- an HTTP server request.res- an HTTP server response.
-
create
public static FormParamsSupport create()
- Returns:
- the singleton instance of
FormParamSupport
-
-