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 HttpRequest
public String getRequestUrl()
getRequestUrl
in interface HttpRequest
public void setRequestUrl(String url)
setRequestUrl
in interface HttpRequest
public void setHeader(String name, String value)
setHeader
in interface HttpRequest
public String getHeader(String name)
getHeader
in interface HttpRequest
public Map<String,String> getAllHeaders()
getAllHeaders
in interface HttpRequest
public InputStream getMessagePayload() throws IOException
getMessagePayload
in interface HttpRequest
IOException
public String getContentType()
getContentType
in interface HttpRequest
public HttpURLConnection unwrap()
HttpRequest
unwrap
in interface HttpRequest
Copyright © 2023. All rights reserved.