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, withTimeout
public 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.Builder
method
- the HTTP method of the request.public StitchDocRequest.Builder withPath(String path)
withPath
in class StitchRequest.Builder
path
- the Stitch API path of the request.public StitchDocRequest.Builder withHeaders(Map<String,String> headers)
withHeaders
in class StitchRequest.Builder
headers
- the headers that will be included in the request.public StitchDocRequest.Builder withBody(byte[] body)
withBody
in class StitchRequest.Builder
body
- a copy of the body that will be sent along with the request.public StitchDocRequest build()
StitchDocRequest
.build
in class StitchRequest.Builder
StitchDocRequest
.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
.