com.amazonaws.http
Class HttpRequest

java.lang.Object
  extended by com.amazonaws.http.HttpRequest

public class HttpRequest
extends Object


Constructor Summary
HttpRequest(HttpMethodName methodName)
          Construct request with http method name Supported methods are: GET POST DELETE HEAD PUT
 
Method Summary
 void addHeader(String name, String value)
          Adds the specified header name and value to this request.
 void addParameter(String name, String value)
           
 InputStream getContent()
          Returns the input stream containing the content to include with this request.
 URI getEndpoint()
          Returns the service endpoint (ex: "https://ec2.amazonaws.com") to which this HTTP request should be sent.
 Map<String,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.
 Map<String,String> getParameters()
          Returns list of request parameters
 String getResourcePath()
          Returns the resource path associated with this request.
 String getServiceName()
          Returns the name of the Amazon service this request is for.
 void removeHeader(String name)
          Removes header from request
 void setContent(InputStream inputStream)
          Sets the input stream containing the content to include with this request.
 void setEndpoint(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(Map<String,String> parameters)
           
 void setResourcePath(String resourcePath)
          Sets the resource path associated with this request.
 void setServiceName(String serviceName)
          Sets the name of the Amazon service this request is for.
 String toString()
           
 HttpRequest withParameter(String name, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpRequest

public HttpRequest(HttpMethodName methodName)
Construct request with http method name Supported methods are: GET POST DELETE HEAD PUT

Parameters:
methodName - http method name
Method Detail

getMethodName

public HttpMethodName getMethodName()
Returns http request method

Returns:
http request method

setServiceName

public void setServiceName(String serviceName)
Sets the name of the Amazon service this request is for.

Parameters:
serviceName - The name of the Amazon service this request is for.

getServiceName

public String getServiceName()
Returns the name of the Amazon service this request is for.

Returns:
The name of the Amazon service this request is for.

getEndpoint

public URI getEndpoint()
Returns the service endpoint (ex: "https://ec2.amazonaws.com") to which this HTTP request should be sent.

Returns:
The service endpoint to which this HTTP request should be sent.

setEndpoint

public void setEndpoint(URI endpoint)
Sets the service endpoint (ex: "https://ec2.amazonaws.com") to which this HTTP request should be sent.

Parameters:
endpoint - The service endpoint to which this HTTP request should be sent.

getParameters

public Map<String,String> getParameters()
Returns list of request parameters

Returns:
list of request parameters

getHeaders

public Map<String,String> getHeaders()
Returns a map of the headers associated with this request

Returns:
a map of the headers associated with this request

addHeader

public void addHeader(String name,
                      String value)
Adds the specified header name and value to this request.

Parameters:
name - The name of the header.
value - The value of the header.

removeHeader

public void removeHeader(String name)
Removes header from request

Parameters:
name - header name to remove

addParameter

public void addParameter(String name,
                         String value)

setParameters

public void setParameters(Map<String,String> parameters)

withParameter

public HttpRequest withParameter(String name,
                                 String value)

getResourcePath

public String getResourcePath()
Returns the resource path associated with this request.

Returns:
The resource path associated with this request.

setResourcePath

public void setResourcePath(String resourcePath)
Sets the resource path associated with this request.

Parameters:
resourcePath - The resource path associated with this request.

setContent

public void setContent(InputStream inputStream)
Sets the input stream containing the content to include with this request.

Parameters:
inputStream - The input stream containing the content to include with this request.

getContent

public InputStream getContent()
Returns the input stream containing the content to include with this request.

Returns:
The input stream containing the content to include with this request.

setOriginalRequest

public void setOriginalRequest(AmazonWebServiceRequest request)
Sets the original request, as constructed by the SDK user, for which this HTTP request is being executed.

Parameters:
request - The original request constructed by the end user.

getOriginalRequest

public AmazonWebServiceRequest getOriginalRequest()
Returns the original request, as constructed by the SDK user, for which this HTTP request is being executed.

Returns:
request The original request constructed by the end user.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2016. All rights reserved.