public class HttpURLConnectionRequestAdapter extends Object implements HttpRequest
| Modifier and Type | Field and Description |
|---|---|
protected HttpURLConnection |
connection |
| Constructor and Description |
|---|
HttpURLConnectionRequestAdapter(HttpURLConnection connection) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getAllHeaders() |
String |
getContentType() |
String |
getHeader(String name) |
InputStream |
getMessagePayload() |
String |
getMethod() |
String |
getRequestUrl() |
void |
setHeader(String name,
String value) |
void |
setRequestUrl(String url) |
HttpURLConnection |
unwrap()
Returns the wrapped request object, in case you must work directly on it.
|
protected HttpURLConnection connection
public HttpURLConnectionRequestAdapter(HttpURLConnection connection)
public String getMethod()
getMethod in interface HttpRequestpublic String getRequestUrl()
getRequestUrl in interface HttpRequestpublic void setRequestUrl(String url)
setRequestUrl in interface HttpRequestpublic void setHeader(String name, String value)
setHeader in interface HttpRequestpublic String getHeader(String name)
getHeader in interface HttpRequestpublic Map<String,String> getAllHeaders()
getAllHeaders in interface HttpRequestpublic InputStream getMessagePayload() throws IOException
getMessagePayload in interface HttpRequestIOExceptionpublic String getContentType()
getContentType in interface HttpRequestpublic HttpURLConnection unwrap()
HttpRequestunwrap in interface HttpRequestCopyright © 2020. All rights reserved.