public class HttpRequest
extends java.lang.Object
AmazonWebServiceRequest
will be translated
to this class before being sent out by HttpClient
.Constructor and Description |
---|
HttpRequest(java.lang.String method,
java.net.URI uri)
Constructs a HttpRequest with given method and uri.
|
HttpRequest(java.lang.String method,
java.net.URI uri,
java.util.Map<java.lang.String,java.lang.String> headers,
java.io.InputStream content)
Constructs a HttpRequest with given method and uri.
|
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
getContent()
Gets the input stream, null if no content.
|
long |
getContentLength()
Gets the length of the content which is set in the header, 0 if no
content.
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders()
Gets an unmodifiable headers map.
|
java.lang.String |
getMethod()
Gets the HTTP method, one of GET, POST, PUT, HEAD, DELETE.
|
java.net.URI |
getUri()
Gets the
URI of this request. |
boolean |
isStreaming() |
void |
setStreaming(boolean isStreaming) |
public HttpRequest(java.lang.String method, java.net.URI uri)
method
- HTTP methoduri
- uri of the request.public HttpRequest(java.lang.String method, java.net.URI uri, java.util.Map<java.lang.String,java.lang.String> headers, java.io.InputStream content)
method
- HTTP methoduri
- uri of the request.headers
- HTTP headers key-value mapcontent
- content of the request. Can be null if no content.public java.lang.String getMethod()
public java.net.URI getUri()
URI
of this request.public java.util.Map<java.lang.String,java.lang.String> getHeaders()
public java.io.InputStream getContent()
public long getContentLength()
public boolean isStreaming()
public void setStreaming(boolean isStreaming)
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.