public class HttpRequest extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected byte[] |
content |
protected static String |
CONTENT_LENGTH |
protected static String |
CONTENT_MD5 |
protected static String |
CONTENT_TYPE |
protected FormatType |
contentType |
protected String |
encoding |
protected Map<String,String> |
headers |
| 构造器和说明 |
|---|
HttpRequest() |
HttpRequest(String strUrl) |
HttpRequest(String strUrl,
Map<String,String> tmpHeaders) |
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
getContent() |
FormatType |
getContentType() |
String |
getEncoding() |
Map<String,String> |
getHeaders() |
String |
getHeaderValue(String name) |
HttpURLConnection |
getHttpConnection() |
MethodType |
getMethod() |
String |
getUrl() |
void |
putHeaderParameter(String name,
String value) |
void |
setContent(byte[] content,
String encoding,
FormatType format) |
void |
setContentType(FormatType contentType) |
void |
setEncoding(String encoding) |
void |
setMethod(MethodType method) |
protected void |
setUrl(String url) |
protected FormatType contentType
protected byte[] content
protected String encoding
public HttpRequest(String strUrl)
public HttpRequest()
public String getUrl()
protected void setUrl(String url)
public String getEncoding()
public void setEncoding(String encoding)
public FormatType getContentType()
public void setContentType(FormatType contentType)
public MethodType getMethod()
public void setMethod(MethodType method)
public byte[] getContent()
public void setContent(byte[] content,
String encoding,
FormatType format)
public HttpURLConnection getHttpConnection() throws IOException
IOExceptionCopyright © 2015. All Rights Reserved.