public interface Request
| Modifier and Type | Method and Description |
|---|---|
void |
addParameter(java.lang.String name,
java.lang.String value)
Adds the specified request parameter to this request.
|
java.io.InputStream |
getContent() |
java.net.URI |
getEndpoint() |
java.util.Map<java.lang.String,java.lang.String> |
getHeaders() |
HttpMethod |
getHttpMethod() |
ApiServiceRequest |
getOriginalRequest()
Returns the original, user facing request object which this basic
request object is representing.
|
java.util.Map<java.lang.String,java.lang.String> |
getParameters() |
java.lang.String |
getResourcePath() |
java.lang.String |
getServiceName() |
int |
getTimeOffset() |
void |
setContent(java.io.InputStream content)
Sets the optional stream containing the payload data to include for this
request.
|
void |
setEndpoint(java.net.URI endpoint)
Sets the service endpoint to which this request should be sent.
|
void |
setHeader(java.lang.String name,
java.lang.String value)
Adds the specified header to this request.
|
void |
setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Sets all headers, clearing any existing ones.
|
void |
setHttpMethod(HttpMethod httpMethod)
Sets the HTTP method to use when sending this request.
|
void |
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Sets all parameters, clearing any existing values.
|
void |
setResourcePath(java.lang.String resourcePath)
Sets the path to the resource being requested.
|
void |
setTimeOffset(int timeOffset)
Sets the optional value for time offset for this request.
|
Request |
withContent(java.io.InputStream content)
Sets the optional stream containing the payload data to include for this
request.
|
Request |
withEndpoint(java.net.URI endpoint)
Sets the service endpoint to which this request should be sent, and
returns the updated
Request object. |
Request |
withHeader(java.lang.String name,
java.lang.String value)
Adds the specified header to this request and returns the updated
Request object. |
Request |
withHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Sets all headers, clearing any existing ones and returns the updated
Request object. |
Request |
withHttpMethod(HttpMethod httpMethod)
Sets the HTTP method to use when sending this request and returns the
updated
Request object. |
Request |
withParameter(java.lang.String name,
java.lang.String value)
Adds the specified request parameter to this request and returns the
updated
Request object. |
Request |
withParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Sets all parameters, clearing any existing values and return the updated
Request object. |
Request |
withResourcePath(java.lang.String resourcePath)
Sets the path to the resource being requested and returns the updated
Request object. |
Request |
withTimeOffset(int timeOffset)
Sets the optional value for time offset for this request.
|
void setHeader(java.lang.String name,
java.lang.String value)
name - the name of the header to add.value - the header's value.Request withHeader(java.lang.String name, java.lang.String value)
Request object.name - the name of the header to add.value - the header's value.Request object with a new header.java.util.Map<java.lang.String,java.lang.String> getHeaders()
void setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
headers - the given map of headers to set.Request withHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Request object.headers - the given map of headers to set.Request object with a new headers.java.lang.String getResourcePath()
void setResourcePath(java.lang.String resourcePath)
resourcePath - the path to the resource being requested.Request withResourcePath(java.lang.String resourcePath)
Request object.resourcePath - the path to the resource being requested.Request object with a new resource path.void addParameter(java.lang.String name,
java.lang.String value)
name - the name of the request parameter.value - the value of the request parameter.Request withParameter(java.lang.String name, java.lang.String value)
Request object.name - the name of the request parameter.value - the value of the request parameter.Request object with a new parameter.java.util.Map<java.lang.String,java.lang.String> getParameters()
void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
parameters - the map of parameters to set.Request withParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Request object.parameters - the map of parameters to set.Request object with new map of parameters.java.net.URI getEndpoint()
void setEndpoint(java.net.URI endpoint)
endpoint - The service endpoint to which this request should be sent.Request withEndpoint(java.net.URI endpoint)
Request object.endpoint - the service endpoint to which this request should be sent.Request object with a new endpoint.HttpMethod getHttpMethod()
void setHttpMethod(HttpMethod httpMethod)
httpMethod - the HTTP method to use when sending this request.Request withHttpMethod(HttpMethod httpMethod)
Request object.httpMethod - the HTTP method to use when sending this request.Request object with a new http method.java.io.InputStream getContent()
void setContent(java.io.InputStream content)
content - the optional stream containing the payload data to include
for request.Request withContent(java.io.InputStream content)
Request object.content - the optional stream containing the payload data to include
for request.Request object with a new content.java.lang.String getServiceName()
int getTimeOffset()
void setTimeOffset(int timeOffset)
timeOffset - The optional value for time offset for this request.Request withTimeOffset(int timeOffset)
Request object.timeOffset - The optional value for time offset for this request.Request object with a new time offset.ApiServiceRequest getOriginalRequest()