public class HttpRequest
extends java.lang.Object
| Constructor and Description |
|---|
HttpRequest(HttpMethodName methodName)
Construct request with http method name
Supported methods are: GET POST DELETE HEAD PUT
|
| Modifier and Type | Method and Description |
|---|---|
void |
addHeader(java.lang.String name,
java.lang.String value)
Adds the specified header name and value to this request.
|
void |
addParameter(java.lang.String name,
java.lang.String value) |
java.io.InputStream |
getContent()
Returns the input stream containing the content to include with this
request.
|
java.net.URI |
getEndpoint()
Returns the service endpoint (ex: "https://ec2.amazonaws.com") to which
this HTTP request should be sent.
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders()
Returns a map of the headers associated with this request
|
HttpMethodName |
getMethodName()
Returns http request method
|
AmazonWebServiceRequest |
getOriginalRequest()
Returns the original request, as constructed by the SDK user, for which
this HTTP request is being executed.
|
java.util.Map<java.lang.String,java.lang.String> |
getParameters()
Returns list of request parameters
|
java.lang.String |
getResourcePath()
Returns the resource path associated with this request.
|
java.lang.String |
getServiceName()
Returns the name of the Amazon service this request is for.
|
void |
removeHeader(java.lang.String name)
Removes header from request
|
void |
setContent(java.io.InputStream inputStream)
Sets the input stream containing the content to include with this
request.
|
void |
setEndpoint(java.net.URI endpoint)
Sets the service endpoint (ex: "https://ec2.amazonaws.com") to which this
HTTP request should be sent.
|
void |
setOriginalRequest(AmazonWebServiceRequest request)
Sets the original request, as constructed by the SDK user, for which this
HTTP request is being executed.
|
void |
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters) |
void |
setResourcePath(java.lang.String resourcePath)
Sets the resource path associated with this request.
|
void |
setServiceName(java.lang.String serviceName)
Sets the name of the Amazon service this request is for.
|
java.lang.String |
toString() |
HttpRequest |
withParameter(java.lang.String name,
java.lang.String value) |
public HttpRequest(HttpMethodName methodName)
methodName - http method namepublic HttpMethodName getMethodName()
public void setServiceName(java.lang.String serviceName)
serviceName - The name of the Amazon service this request is for.public java.lang.String getServiceName()
public java.net.URI getEndpoint()
public void setEndpoint(java.net.URI endpoint)
endpoint - The service endpoint to which this HTTP request should be
sent.public java.util.Map<java.lang.String,java.lang.String> getParameters()
public java.util.Map<java.lang.String,java.lang.String> getHeaders()
public void addHeader(java.lang.String name,
java.lang.String value)
name - The name of the header.value - The value of the header.public void removeHeader(java.lang.String name)
name - header name to removepublic void addParameter(java.lang.String name,
java.lang.String value)
public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
public HttpRequest withParameter(java.lang.String name, java.lang.String value)
public java.lang.String getResourcePath()
public void setResourcePath(java.lang.String resourcePath)
resourcePath - The resource path associated with this request.public void setContent(java.io.InputStream inputStream)
inputStream - The input stream containing the content to include with this
request.public java.io.InputStream getContent()
public void setOriginalRequest(AmazonWebServiceRequest request)
request - The original request constructed by the end user.public AmazonWebServiceRequest getOriginalRequest()
public java.lang.String toString()
toString in class java.lang.Object