Interface ResponseMarshaler.Builder.OptionsHandler
- Enclosing class:
ResponseMarshaler.Builder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Function used to support pluggable implementations of
ResponseMarshaler.forOptions(Request, Set).- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionhandle(Request request, Set<HttpMethod> allowedHttpMethods) Prepares a response for an HTTPOPTIONSrequest.
-
Method Details
-
handle
@Nonnull MarshaledResponse handle(@Nonnull Request request, @Nonnull Set<HttpMethod> allowedHttpMethods) Prepares a response for an HTTPOPTIONSrequest.Note that CORS preflight responses are handled specially by
ResponseMarshaler.forCorsPreflightAllowed(Request, CorsPreflight, CorsPreflightResponse)andResponseMarshaler.forCorsPreflightRejected(Request, CorsPreflight)- not this method.Detailed documentation is available at https://www.soklet.com/docs/response-writing#http-options.
- Parameters:
request- the HTTP requestallowedHttpMethods- appropriate HTTP methods to write to theAllowresponse header- Returns:
- the response to be sent over the wire
-