| Constructor and Description |
|---|
Builder()
Constructs a new builder.
|
| Modifier and Type | Method and Description |
|---|---|
Request |
build()
Builds, validates, and returns the
Request. |
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.
|
Long |
getTimeout()
Returns the number of milliseconds that the underlying transport should spend on an HTTP
round trip before failing with an error.
|
String |
getUrl()
Returns the URL that the request will be performed against.
|
Request.Builder |
withBody(byte[] body)
Sets a copy of the body that will be sent along with the request.
|
Request.Builder |
withHeaders(Map<String,String> headers)
Sets the headers that will be included in the request.
|
Request.Builder |
withMethod(Method method)
Sets the HTTP method of the request.
|
Request.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.
|
Request.Builder |
withUrl(String url)
Sets the URL that the request will be performed against.
|
public Request.Builder withUrl(String url)
url - the URL that the request will be performed against.public Request.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 Request.Builder withHeaders(Map<String,String> headers)
headers - the headers that will be included in the request.public Request.Builder withBody(byte[] body)
body - the body that will be sent along with the request.public Request.Builder withMethod(Method method)
method - the HTTP method of the request.public String getUrl()
public Long getTimeout()
public Map<String,String> getHeaders()
public byte[] getBody()
public Method getMethod()