public abstract class AbstractHttpRequest<T> extends java.lang.Object implements HttpRequest<T>
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractHttpRequest(Request 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 |
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.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetContentLength, getContentType, getUnderlying, withContent, withHeader, withHeaders, withHttpMethod, withParameter, withParameters, withResourcePath, withTimeOffsetprotected final Request request
protected AbstractHttpRequest(Request request)
public HttpMethod getHttpMethod()
getHttpMethod in interface HttpRequest<T>public void setHttpMethod(HttpMethod httpMethod)
HttpRequestsetHttpMethod in interface HttpRequest<T>httpMethod - the HTTP method to use when sending this request.public java.io.InputStream getContent()
getContent in interface HttpRequest<T>public void setContent(java.io.InputStream content)
HttpRequestsetContent in interface HttpRequest<T>content - the optional stream containing the payload data to include
for request.public int getTimeOffset()
getTimeOffset in interface HttpRequest<T>public void setTimeOffset(int timeOffset)
HttpRequestsetTimeOffset in interface HttpRequest<T>timeOffset - The optional value for time offset for this request.public java.lang.String getResourcePath()
getResourcePath in interface HttpRequest<T>public void setResourcePath(java.lang.String resourcePath)
HttpRequestsetResourcePath in interface HttpRequest<T>resourcePath - the path to the resource being requested.public java.lang.String getServiceName()
getServiceName in interface HttpRequest<T>public java.net.URI getEndpoint()
getEndpoint in interface HttpRequest<T>public java.util.Map<java.lang.String,java.lang.String> getHeaders()
getHeaders in interface HttpRequest<T>public void setHeader(java.lang.String name,
java.lang.String value)
HttpRequestsetHeader in interface HttpRequest<T>name - the name of the header to add.value - the header's value.public void setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
HttpRequestsetHeaders in interface HttpRequest<T>headers - the given map of headers to set.public java.util.Map<java.lang.String,java.lang.String> getParameters()
getParameters in interface HttpRequest<T>public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
HttpRequestsetParameters in interface HttpRequest<T>parameters - the map of parameters to set.public void addParameter(java.lang.String name,
java.lang.String value)
HttpRequestaddParameter in interface HttpRequest<T>name - the name of the request parameter.value - the value of the request parameter.public ApiServiceRequest getOriginalRequest()
HttpRequestgetOriginalRequest in interface HttpRequest<T>public java.lang.String toString()
toString in class java.lang.Object