public class HttpRequest extends Object
限定符和类型 | 字段和说明 |
---|---|
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 |
构造器和说明 |
---|
HttpRequest() |
HttpRequest(String strUrl) |
HttpRequest(String strUrl,
Map<String,String> tmpHeaders) |
限定符和类型 | 方法和说明 |
---|---|
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 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
IOException
Copyright © 2019. All Rights Reserved.