public interface HttpRequest<T>
| 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() |
int |
getContentLength() |
java.lang.String |
getContentType() |
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() |
T |
getUnderlying() |
void |
setContent(java.io.InputStream content)
Sets the optional stream containing the payload data to include for this
request.
|
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.
|
HttpRequest<T> |
withContent(java.io.InputStream content)
Sets the optional stream containing the payload data to include for this
request.
|
HttpRequest<T> |
withHeader(java.lang.String name,
java.lang.String value)
Adds the specified header to this request and returns the updated
HttpRequest object.
|
HttpRequest<T> |
withHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Sets all headers, clearing any existing ones and returns the updated
HttpRequest object. |
HttpRequest<T> |
withHttpMethod(HttpMethod httpMethod)
Sets the HTTP method to use when sending this request and returns the
updated
HttpRequest object. |
HttpRequest<T> |
withParameter(java.lang.String name,
java.lang.String value)
Adds the specified request parameter to this request and returns the
updated
HttpRequest object. |
HttpRequest<T> |
withParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Sets all parameters, clearing any existing values and return the updated
HttpRequest object. |
HttpRequest<T> |
withResourcePath(java.lang.String resourcePath)
Sets the path to the resource being requested and returns the updated
HttpRequest object. |
HttpRequest<T> |
withTimeOffset(int timeOffset)
Sets the optional value for time offset for this request.
|
java.lang.String getContentType()
int getContentLength()
T getUnderlying()
void setHeader(java.lang.String name,
java.lang.String value)
name - the name of the header to add.value - the header's value.HttpRequest<T> withHeader(java.lang.String name, java.lang.String value)
name - the name of the header to add.value - the header's value.HttpRequest 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.HttpRequest<T> withHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
HttpRequest object.headers - the given map of headers to set.HttpRequest object with a new headers.java.lang.String getResourcePath()
void setResourcePath(java.lang.String resourcePath)
resourcePath - the path to the resource being requested.HttpRequest<T> withResourcePath(java.lang.String resourcePath)
HttpRequest object.resourcePath - the path to the resource being requested.HttpRequest 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.HttpRequest<T> withParameter(java.lang.String name, java.lang.String value)
HttpRequest object.name - the name of the request parameter.value - the value of the request parameter.HttpRequest 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.HttpRequest<T> withParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
HttpRequest object.parameters - the map of parameters to set.HttpRequest object with new map of parameters.java.net.URI getEndpoint()
HttpMethod getHttpMethod()
void setHttpMethod(HttpMethod httpMethod)
httpMethod - the HTTP method to use when sending this request.HttpRequest<T> withHttpMethod(HttpMethod httpMethod)
HttpRequest object.httpMethod - the HTTP method to use when sending this request.HttpRequest 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.HttpRequest<T> withContent(java.io.InputStream content)
HttpRequest object.content - the optional stream containing the payload data to include
for request.HttpRequest 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.HttpRequest<T> withTimeOffset(int timeOffset)
HttpRequest object.timeOffset - The optional value for time offset for this request.HttpRequest object with a new time offset.ApiServiceRequest getOriginalRequest()