Package io.servicetalk.http.api
Class StreamingHttpRequests
- java.lang.Object
-
- io.servicetalk.http.api.StreamingHttpRequests
-
public final class StreamingHttpRequests extends java.lang.ObjectFactory methods for creatingStreamingHttpRequests.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StreamingHttpRequestnewRequest(HttpRequestMethod method, java.lang.String requestTarget, HttpProtocolVersion version, HttpHeaders headers, BufferAllocator allocator, HttpHeadersFactory headersFactory)Creates a newStreamingHttpRequest.static StreamingHttpRequestnewTransportRequest(HttpRequestMethod method, java.lang.String requestTarget, HttpProtocolVersion version, HttpHeaders headers, BufferAllocator allocator, Publisher<java.lang.Object> payload, boolean requireTrailerHeader, HttpHeadersFactory headersFactory)Creates a newStreamingHttpRequestwhich is read from the transport.
-
-
-
Method Detail
-
newRequest
public static StreamingHttpRequest newRequest(HttpRequestMethod method, java.lang.String requestTarget, HttpProtocolVersion version, HttpHeaders headers, BufferAllocator allocator, HttpHeadersFactory headersFactory)
Creates a newStreamingHttpRequest.- Parameters:
method- theHttpRequestMethodof the request.requestTarget- the request-target of the request.version- theHttpProtocolVersionof the request.headers- theHttpHeadersof the request.allocator- the allocator used for serialization purposes if necessary.headersFactory-HttpHeadersFactoryto use.- Returns:
- a new
StreamingHttpRequest.
-
newTransportRequest
public static StreamingHttpRequest newTransportRequest(HttpRequestMethod method, java.lang.String requestTarget, HttpProtocolVersion version, HttpHeaders headers, BufferAllocator allocator, Publisher<java.lang.Object> payload, boolean requireTrailerHeader, HttpHeadersFactory headersFactory)
Creates a newStreamingHttpRequestwhich is read from the transport. If the request contains trailers then the passedpayloadPublishershould also emitHttpHeadersbefore completion.- Parameters:
method- theHttpRequestMethodof the request.requestTarget- the request-target of the request.version- theHttpProtocolVersionof the request.headers- theHttpHeadersof the request.allocator- the allocator used for serialization purposes if necessary.payload- aPublisherfor payload that optionally emitsHttpHeadersif the request contains trailers.requireTrailerHeader-trueif Trailer header is required to accept trailers.falseassumes trailers may be present if other criteria allows.headersFactory-HttpHeadersFactoryto use.- Returns:
- a new
StreamingHttpRequest.
-
-