public class HttpRequest
extends java.lang.Object
HttpRequest(String)
HttpRequest(String, Map)
Constructor and Description |
---|
HttpRequest(java.lang.String url) |
HttpRequest(java.lang.String url,
java.util.Map<java.lang.String,java.lang.String> parasMap) |
Modifier and Type | Method and Description |
---|---|
int |
getConnectTimeout() |
java.lang.String |
getParas() |
java.util.Map<java.lang.String,java.lang.String> |
getParasMap()
get paras map
|
int |
getReadTimeout() |
java.util.Map<java.lang.String,java.lang.String> |
getRequestProperties() |
java.lang.String |
getRequestProperty(java.lang.String field) |
java.lang.String |
getUrl() |
void |
setConnectTimeout(int timeoutMillis) |
void |
setParasMap(java.util.Map<java.lang.String,java.lang.String> parasMap)
set paras map
|
void |
setReadTimeout(int timeoutMillis) |
void |
setRequestProperties(java.util.Map<java.lang.String,java.lang.String> requestProperties) |
void |
setRequestProperty(java.lang.String field,
java.lang.String newValue) |
void |
setUserAgent(java.lang.String value)
same to
setRequestProperty(String, String) filed is User-Agent |
public HttpRequest(java.lang.String url)
public HttpRequest(java.lang.String url, java.util.Map<java.lang.String,java.lang.String> parasMap)
public java.lang.String getUrl()
public int getConnectTimeout()
URLConnection.getConnectTimeout()
public void setConnectTimeout(int timeoutMillis)
timeoutMillis
- URLConnection.setConnectTimeout(int)
public int getReadTimeout()
URLConnection.getReadTimeout()
public void setReadTimeout(int timeoutMillis)
timeoutMillis
- URLConnection.setReadTimeout(int)
public java.util.Map<java.lang.String,java.lang.String> getParasMap()
public void setParasMap(java.util.Map<java.lang.String,java.lang.String> parasMap)
parasMap
- public java.lang.String getParas()
public void setRequestProperty(java.lang.String field, java.lang.String newValue)
field
- newValue
- URLConnection.setRequestProperty(String, String)
public java.lang.String getRequestProperty(java.lang.String field)
field
- URLConnection.getRequestProperty(String)
public void setUserAgent(java.lang.String value)
setRequestProperty(String, String)
filed is User-Agentvalue
- URLConnection.setRequestProperty(String, String)
public java.util.Map<java.lang.String,java.lang.String> getRequestProperties()
public void setRequestProperties(java.util.Map<java.lang.String,java.lang.String> requestProperties)
requestProperties
-