public class HttpRequest extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Integer |
connectTimeout |
protected static String |
CONTENT_LENGTH |
protected static String |
CONTENT_MD5 |
protected static String |
CONTENT_TYPE |
protected String |
encoding |
protected Map<String,String> |
headers |
protected byte[] |
httpContent |
protected FormatType |
httpContentType |
protected Integer |
readTimeout |
| Constructor and Description |
|---|
HttpRequest() |
HttpRequest(String strUrl) |
HttpRequest(String strUrl,
Map<String,String> tmpHeaders) |
| Modifier and Type | Method and Description |
|---|---|
Integer |
getConnectTimeout() |
String |
getEncoding() |
Map<String,String> |
getHeaders() |
String |
getHeaderValue(String name) |
HttpURLConnection |
getHttpConnection() |
byte[] |
getHttpContent() |
FormatType |
getHttpContentType() |
MethodType |
getMethod() |
Integer |
getReadTimeout() |
String |
getUrl() |
void |
putHeaderParameter(String name,
String value) |
void |
setConnectTimeout(Integer connectTimeout) |
void |
setEncoding(String encoding) |
void |
setHttpContent(byte[] content,
String encoding,
FormatType format) |
void |
setHttpContentType(FormatType httpContentType) |
void |
setMethod(MethodType method) |
void |
setReadTimeout(Integer readTimeout) |
protected void |
setUrl(String url) |
protected static final String CONTENT_TYPE
protected static final String CONTENT_MD5
protected static final String CONTENT_LENGTH
protected FormatType httpContentType
protected byte[] httpContent
protected String encoding
protected Integer connectTimeout
protected Integer readTimeout
public HttpRequest(String strUrl)
public HttpRequest()
public String getUrl()
protected void setUrl(String url)
public String getEncoding()
public void setEncoding(String encoding)
public FormatType getHttpContentType()
public void setHttpContentType(FormatType httpContentType)
public MethodType getMethod()
public void setMethod(MethodType method)
public byte[] getHttpContent()
public Integer getConnectTimeout()
public void setConnectTimeout(Integer connectTimeout)
public Integer getReadTimeout()
public void setReadTimeout(Integer readTimeout)
public void setHttpContent(byte[] content,
String encoding,
FormatType format)
public HttpURLConnection getHttpConnection() throws IOException
IOExceptionCopyright © 2024. All Rights Reserved.