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 handlers
When 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 void
accept(ServerRequest req, ServerResponse res)
static FormParamsSupport
create()
void
update(Routing.Rules rules)
UpdatesRouting.Rules
withhandlers
representing 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:Service
UpdatesRouting.Rules
withhandlers
representing this service.
-
accept
public void accept(ServerRequest req, ServerResponse res)
Description copied from interface:Handler
- Specified by:
accept
in interfaceBiConsumer<ServerRequest,ServerResponse>
- Specified by:
accept
in interfaceHandler
- Parameters:
req
- an HTTP server request.res
- an HTTP server response.
-
create
public static FormParamsSupport create()
- Returns:
- the singleton instance of
FormParamSupport
-
-