public class HttpRequest extends Object
AmazonWebServiceRequest
will be translated
to this class before being sent out by HttpClient
.Constructor and Description |
---|
HttpRequest(String method,
URI uri)
Constructs a HttpRequest with given method and uri.
|
HttpRequest(String method,
URI uri,
Map<String,String> headers,
InputStream content)
Constructs a HttpRequest with given method and uri.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Map<String,String> |
getHeaders()
Gets an unmodifiable headers map.
|
String |
getMethod()
Gets the HTTP method, one of GET, POST, PUT, HEAD, DELETE.
|
URI |
getUri()
Gets the
URI of this request. |
boolean |
isStreaming() |
void |
setStreaming(boolean isStreaming) |
public HttpRequest(String method, URI uri)
method
- HTTP methoduri
- uri of the request.public HttpRequest(String method, URI uri, Map<String,String> headers, 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 String getMethod()
public Map<String,String> getHeaders()
public InputStream getContent()
public long getContentLength()
public boolean isStreaming()
public void setStreaming(boolean isStreaming)
Copyright © 2020. All rights reserved.