public static class StitchAuthDocRequest.Builder extends StitchAuthRequest.Builder
| Constructor and Description |
|---|
Builder()
Constructs a new builder.
|
| Modifier and Type | Method and Description |
|---|---|
StitchAuthDocRequest |
build()
Builds the
StitchAuthDocRequest. |
StitchAuthDocRequest |
build(CodecRegistry codecRegistry)
Builds the
StitchAuthDocRequest using the given codec registry for encoding the
document. |
Document |
getDocument()
Returns the document to send in the request.
|
StitchAuthDocRequest.Builder |
withAccessToken()
Set if this request should use an access token in this request.
|
StitchAuthDocRequest.Builder |
withBody(byte[] body)
Sets a copy of the body that will be sent along with the request.
|
StitchAuthDocRequest.Builder |
withDocument(Document document)
Sets the document to send in the request.
|
StitchAuthDocRequest.Builder |
withHeaders(Map<String,String> headers)
Sets the headers that will be included in the request.
|
StitchAuthDocRequest.Builder |
withMethod(Method method)
Sets the HTTP method of the request.
|
StitchAuthDocRequest.Builder |
withPath(String path)
Sets the Stitch API path of the request.
|
StitchAuthDocRequest.Builder |
withRefreshToken()
Set if this request should use a refresh token in this request.
|
StitchAuthDocRequest.Builder |
withShouldRefreshOnFailure(boolean shouldRefresh)
Sets whether or not the performer of this request should attempt to refresh authentication
info on failure.
|
getBody, getHeaders, getMethod, getPath, getTimeout, withTimeoutpublic StitchAuthDocRequest.Builder withDocument(Document document)
document - the document to send in the request.public Document getDocument()
public StitchAuthDocRequest.Builder withAccessToken()
withAccessToken in class StitchAuthRequest.Builderpublic StitchAuthDocRequest.Builder withRefreshToken()
withRefreshToken in class StitchAuthRequest.Builderpublic StitchAuthDocRequest.Builder withShouldRefreshOnFailure(boolean shouldRefresh)
withShouldRefreshOnFailure in class StitchAuthRequest.BuildershouldRefresh - whether or not the performer of this request should attempt to refresh
authentication info on failure.public StitchAuthDocRequest.Builder withMethod(Method method)
withMethod in class StitchAuthRequest.Buildermethod - the HTTP method of the request.public StitchAuthDocRequest.Builder withPath(String path)
withPath in class StitchAuthRequest.Builderpath - the Stitch API path of the request.public StitchAuthDocRequest.Builder withHeaders(Map<String,String> headers)
withHeaders in class StitchAuthRequest.Builderheaders - the headers that will be included in the request.public StitchAuthDocRequest.Builder withBody(byte[] body)
withBody in class StitchAuthRequest.Builderbody - a copy of the body that will be sent along with the request.public StitchAuthDocRequest build()
StitchAuthDocRequest.build in class StitchAuthRequest.BuilderStitchAuthDocRequest.public StitchAuthDocRequest build(CodecRegistry codecRegistry)
StitchAuthDocRequest using the given codec registry for encoding the
document.codecRegistry - the registry to use for encoding the document.StitchAuthDocRequest.