public static class StitchDocRequest.Builder extends StitchRequest.Builder
| Constructor and Description |
|---|
Builder()
Constructs a new builder.
|
| Modifier and Type | Method and Description |
|---|---|
StitchDocRequest |
build()
Builds the
StitchDocRequest. |
StitchDocRequest |
build(CodecRegistry codecRegistry)
Builds the
StitchDocRequest using the given codec registry for encoding the
document. |
Document |
getDocument()
Returns the document to send in the request.
|
StitchDocRequest.Builder |
withBody(byte[] body)
Sets a copy of the body that will be sent along with the request.
|
StitchDocRequest.Builder |
withDocument(Document document)
Sets the document to send in the request.
|
StitchDocRequest.Builder |
withHeaders(Map<String,String> headers)
Sets the headers that will be included in the request.
|
StitchDocRequest.Builder |
withMethod(Method method)
Sets the HTTP method of the request.
|
StitchDocRequest.Builder |
withPath(String path)
Sets the Stitch API path of the request.
|
getBody, getHeaders, getMethod, getPath, getTimeout, withTimeoutpublic StitchDocRequest.Builder withDocument(Document document)
document - the document to send in the request.public Document getDocument()
public StitchDocRequest.Builder withMethod(Method method)
withMethod in class StitchRequest.Buildermethod - the HTTP method of the request.public StitchDocRequest.Builder withPath(String path)
withPath in class StitchRequest.Builderpath - the Stitch API path of the request.public StitchDocRequest.Builder withHeaders(Map<String,String> headers)
withHeaders in class StitchRequest.Builderheaders - the headers that will be included in the request.public StitchDocRequest.Builder withBody(byte[] body)
withBody in class StitchRequest.Builderbody - a copy of the body that will be sent along with the request.public StitchDocRequest build()
StitchDocRequest.build in class StitchRequest.BuilderStitchDocRequest.public StitchDocRequest build(CodecRegistry codecRegistry)
StitchDocRequest using the given codec registry for encoding the
document.codecRegistry - the registry to use for encoding the document.StitchDocRequest.