public class RequestUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Future<ValidatableRequest> |
extract(HttpServerRequest request,
Operation operation)
Extracts and transforms the parameters and the body of an incoming request into a
format
that can be validated by the RequestValidator . |
static Future<ValidatableRequest> |
extract(HttpServerRequest request,
Operation operation,
java.util.function.Supplier<Future<Buffer>> bodySupplier)
Like
extract(HttpServerRequest, Operation) , but offers to pass a supplier fpr the body. |
public static Future<ValidatableRequest> extract(HttpServerRequest request, Operation operation)
format
that can be validated by the RequestValidator
.request
- the incoming request.operation
- the operation of the related request.Future
holding the ValidatableRequest.public static Future<ValidatableRequest> extract(HttpServerRequest request, Operation operation, java.util.function.Supplier<Future<Buffer>> bodySupplier)
extract(HttpServerRequest, Operation)
, but offers to pass a supplier fpr the body. This is
helpful in case that the request has already been read.request
- the incoming request.operation
- the operation of the related request.bodySupplier
- the body supplier which can help in case that the request has already been read.Future
holding the ValidatableRequest.Copyright © 2024 Eclipse. All rights reserved.