public final class StreamingHttpRequests
extends Object
StreamingHttpRequests.| Modifier and Type | Method and Description |
|---|---|
static StreamingHttpRequest |
newRequest(HttpRequestMethod method,
String requestTarget,
HttpProtocolVersion version,
HttpHeaders headers,
BufferAllocator allocator,
HttpHeadersFactory headersFactory)
Creates a new
StreamingHttpRequest. |
static StreamingHttpRequest |
newTransportRequest(HttpRequestMetaData metaData,
BufferAllocator allocator,
Publisher<Object> payload,
boolean requireTrailerHeader,
HttpHeadersFactory headersFactory)
Creates a new
StreamingHttpRequest which is read from the transport. |
static StreamingHttpRequest |
newTransportRequest(HttpRequestMethod method,
String requestTarget,
HttpProtocolVersion version,
HttpHeaders headers,
BufferAllocator allocator,
Publisher<Object> payload,
boolean requireTrailerHeader,
HttpHeadersFactory headersFactory)
Deprecated.
|
public static StreamingHttpRequest newRequest(HttpRequestMethod method, String requestTarget, HttpProtocolVersion version, HttpHeaders headers, BufferAllocator allocator, HttpHeadersFactory headersFactory)
StreamingHttpRequest.method - the HttpRequestMethod of the request.requestTarget - the request-target of the
request.version - the HttpProtocolVersion of the request.headers - the HttpHeaders of the request. Note that newly created and returned
StreamingHttpRequest will use this HttpHeaders directly, which means later mutation of
HttpHeaders will have side effects on returned request and should be avoided as these operations are not
thread safe.allocator - the allocator used for serialization purposes if necessary.headersFactory - HttpHeadersFactory to use.StreamingHttpRequest.@Deprecated public static StreamingHttpRequest newTransportRequest(HttpRequestMethod method, String requestTarget, HttpProtocolVersion version, HttpHeaders headers, BufferAllocator allocator, Publisher<Object> payload, boolean requireTrailerHeader, HttpHeadersFactory headersFactory)
newTransportRequest(HttpRequestMetaData, BufferAllocator, Publisher, boolean,
HttpHeadersFactory) instead.StreamingHttpRequest which is read from the transport. If the request contains
trailers then the passed payload
Publisher should also emit HttpHeaders before completion.method - the HttpRequestMethod of the request.requestTarget - the request-target of the
request.version - the HttpProtocolVersion of the request.headers - the HttpHeaders of the request. Note that newly created and returned
StreamingHttpRequest will use this HttpHeaders directly, which means later mutation of
HttpHeaders will have side effects on returned request and should be avoided as these operations are not
thread safe.allocator - the allocator used for serialization purposes if necessary.payload - a Publisher for payload that optionally emits HttpHeaders if the request contains
trailers.requireTrailerHeader - true if Trailer
header is required to accept trailers. false assumes trailers may be present if other criteria allows.headersFactory - HttpHeadersFactory to use.StreamingHttpRequest.public static StreamingHttpRequest newTransportRequest(HttpRequestMetaData metaData, BufferAllocator allocator, Publisher<Object> payload, boolean requireTrailerHeader, HttpHeadersFactory headersFactory)
StreamingHttpRequest which is read from the transport.
If the request contains trailers then the passed
payload Publisher must also emit HttpHeaders before completion.
metaData - the HttpRequestMetaData of the request parsed by the transport layer. Note that newly
created and returned StreamingHttpRequest will use this HttpRequestMetaData directly and share
its parts, which means later mutation of HttpRequestMetaData will have side effects on returned request
and should be avoided as these operations are not thread safe.allocator - the allocator to use for serialization purposes if necessary.payload - a Publisher for payload that optionally emits HttpHeaders if the request contains
trailers.requireTrailerHeader - true if Trailer
header is required to accept trailers. false assumes trailers may be present if other criteria allows.headersFactory - HttpHeadersFactory to use to allocate trailers if necessary.StreamingHttpRequest.