public static class StitchRequest.Builder extends Object
StitchRequest
s.Constructor and Description |
---|
Builder()
Constructs a new builder.
|
Modifier and Type | Method and Description |
---|---|
StitchRequest |
build()
Builds, validates, and returns the
StitchRequest . |
byte[] |
getBody()
Returns a copy of the body that will be sent along with the request.
|
Map<String,String> |
getHeaders()
Returns the headers that will be included in the request.
|
Method |
getMethod()
Returns the HTTP method of the request.
|
String |
getPath()
Returns the Stitch API path of the request.
|
Long |
getTimeout()
Returns the number of milliseconds that the underlying transport should spend on an HTTP
round trip before failing with an error.
|
StitchRequest.Builder |
withBody(byte[] body)
Sets a copy of the body that will be sent along with the request.
|
StitchRequest.Builder |
withHeaders(Map<String,String> headers)
Sets the headers that will be included in the request.
|
StitchRequest.Builder |
withMethod(Method method)
Sets the HTTP method of the request.
|
StitchRequest.Builder |
withPath(String path)
Sets the Stitch API path of the request.
|
StitchRequest.Builder |
withTimeout(Long timeout)
Sets the number of milliseconds that the underlying transport should spend on an HTTP round
trip before failing with an error.
|
public StitchRequest.Builder withMethod(Method method)
method
- the HTTP method of the request.public StitchRequest.Builder withPath(String path)
path
- the Stitch API path of the request.public StitchRequest.Builder withTimeout(Long timeout)
timeout
- the number of milliseconds that the underlying transport should spend on an
HTTP round trip before failing with an error.public StitchRequest.Builder withHeaders(Map<String,String> headers)
headers
- the headers that will be included in the request.public StitchRequest.Builder withBody(byte[] body)
body
- a copy of the body that will be sent along with the request.public Method getMethod()
public String getPath()
public Long getTimeout()
public Map<String,String> getHeaders()
public byte[] getBody()
public StitchRequest build()
StitchRequest
.StitchRequest
.