public final class MultiPartMIMEStreamRequestFactory
extends java.lang.Object
StreamRequest.| Modifier and Type | Method and Description |
|---|---|
static com.linkedin.r2.message.stream.StreamRequest |
generateMultiPartMIMEStreamRequest(java.net.URI uri,
java.lang.String mimeSubType,
MultiPartMIMEWriter writer)
Create a
StreamRequest using the specified parameters. |
static com.linkedin.r2.message.stream.StreamRequest |
generateMultiPartMIMEStreamRequest(java.net.URI uri,
java.lang.String mimeSubType,
MultiPartMIMEWriter writer,
java.util.Map<java.lang.String,java.lang.String> contentTypeParameters)
Create a
StreamRequest using the specified parameters. |
static com.linkedin.r2.message.stream.StreamRequest |
generateMultiPartMIMEStreamRequest(java.net.URI uri,
java.lang.String mimeSubType,
MultiPartMIMEWriter writer,
java.util.Map<java.lang.String,java.lang.String> contentTypeParameters,
java.lang.String method,
java.util.Map<java.lang.String,java.lang.String> headers,
java.util.List<java.lang.String> cookies)
Create a
StreamRequest using the specified parameters. |
public static com.linkedin.r2.message.stream.StreamRequest generateMultiPartMIMEStreamRequest(java.net.URI uri,
java.lang.String mimeSubType,
MultiPartMIMEWriter writer)
StreamRequest using the specified parameters. This API should be used
if the user does not have a need to define a StreamRequestBuilder in advance.
The result of this method will generate a StreamRequest using the specified URI, an HTTP method of
com.linkedin.r2.message.rest.RestMethod#POST, a single header representing the generated Content-Type and no cookies.uri - the target URI to be used.mimeSubType - the mime subtype of the multipart to be used. For example, 'mixed' would result in a Content-Type of
'multipart/mixed'. It is generally good practice to use subtypes described in RFC 1341, although
this API does not enforce this.writer - the MultiPartMIMEWriter to use for the payload of the request.StreamRequest.public static com.linkedin.r2.message.stream.StreamRequest generateMultiPartMIMEStreamRequest(java.net.URI uri,
java.lang.String mimeSubType,
MultiPartMIMEWriter writer,
java.util.Map<java.lang.String,java.lang.String> contentTypeParameters)
StreamRequest using the specified parameters. This API should be used
if the user does not have a need to define a StreamRequestBuilder in advance.
The result of this method will generate a StreamRequest using the specified URI, an HTTP method of
com.linkedin.r2.message.rest.RestMethod#POST, a single header representing the generated Content-Type and no cookies.uri - the target URI to be used.mimeSubType - the mime subtype of the multipart to be used. For example, 'mixed' would result in a Content-Type of
'multipart/mixed'. It is generally good practice to use subtypes described in RFC 1341, although
this API does not enforce this.writer - the MultiPartMIMEWriter to use for the payload of the request.contentTypeParameters - any additional parameters (i.e "charset") needed when constructing the Content-Type header. These
parameters are added after the following prefix: "multipart/StreamRequest.public static com.linkedin.r2.message.stream.StreamRequest generateMultiPartMIMEStreamRequest(java.net.URI uri,
java.lang.String mimeSubType,
MultiPartMIMEWriter writer,
java.util.Map<java.lang.String,java.lang.String> contentTypeParameters,
java.lang.String method,
java.util.Map<java.lang.String,java.lang.String> headers,
java.util.List<java.lang.String> cookies)
StreamRequest using the specified parameters. This API should be used
if the user has a need to specify custom HTTP method, headers or cookies in advance. The exception to this rule is
the Content-Type header which this API will override.uri - the target URI to be used.mimeSubType - the mime subtype of the multipart to be used. For example, 'mixed' would result in a Content-Type of
'multipart/mixed'. It is generally good practice to use subtypes described in RFC 1341, although
this API does not enforce this.writer - the MultiPartMIMEWriter to use for the payload of the request.contentTypeParameters - any additional parameters (i.e "charset") needed when constructing the Content-Type header. These
parameters are added after the following prefix: "multipart/method - the HTTP method to use for the request. Details can be found at com.linkedin.r2.message.rest.RestMethod.headers - a Map specifying the headers to be a part of the final
StreamRequest.cookies - a List of cookies to be placed in the request.StreamRequest.