@Deprecated public class HttpVisitorImpl extends Object implements HttpVisitor
| Constructor and Description |
|---|
HttpVisitorImpl()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(org.apache.commons.httpclient.Cookie cookie)
Deprecated.
添加Cookie
|
void |
addCookie(org.apache.commons.httpclient.Cookie[] cookies)
Deprecated.
添加一组Cookie
|
org.apache.commons.httpclient.Cookie[] |
getCookies()
Deprecated.
返回Cookie,在请求完成之后获取,得到是的从浏览器从传入的
|
org.apache.commons.httpclient.HttpClient |
getHttpClient()
Deprecated.
获取HttpClient对象
|
org.apache.commons.httpclient.HttpState |
getHttpState()
Deprecated.
获取Http状态
|
String |
getRequestCharset()
Deprecated.
|
String |
getResponseCharset()
Deprecated.
|
String |
getUrl(String url,
Map<String,?> parameter)
Deprecated.
用get方式访问URL
|
void |
init()
Deprecated.
初始化,在访问url之前,必须调用init方法
|
String |
postSoap(String url,
String xmlEntiry)
Deprecated.
Post SOAP内容
|
String |
postSoap(String url,
String soapAction,
String xmlEntiry)
Deprecated.
Post SOAP内容
|
String |
postUrl(String url,
Map<String,?> parameter)
Deprecated.
用post方式访问URL
|
String |
postXml(String url,
String xmlEntiry)
Deprecated.
Post Xml内容
|
void |
setAlternateAuth(String host,
int port,
String username,
String password,
List<String> schemaList)
Deprecated.
设置自动检测安全校验
|
void |
setBasicAuth(String host,
int port,
String username,
String password)
Deprecated.
设置基本安全校验,realm和schema全部适应全部
比设定了realm和schema的性能差一些 |
void |
setBasicAuth(String host,
int port,
String realm,
String schema,
String username,
String password)
Deprecated.
设置基本安全校验
|
HttpVisitor |
setHeader(String key,
String value)
Deprecated.
设置Header值
|
void |
setHeaderMap(Map<String,String> headerMap)
Deprecated.
设置Header
|
void |
setProxy(String proxyHost,
int proxyPort,
String userName,
String passwrod)
Deprecated.
设置代理
|
void |
setRequestCharset(String requestCharset)
Deprecated.
需要在请求之前设置
设置请求编码,如果不设置,则默认是ISO-8859-1 注意:修改此参数要慎重,确认服务器的解码格式是修改的编码,否则会导致乱码出现 |
void |
setResponseCharset(String charset)
Deprecated.
设置响应编码,如果不设置,则默认是UTF-8
|
void |
setTimeout(int timeout)
Deprecated.
设置超时时间,必须在init之前调用
|
public void setProxy(String proxyHost, int proxyPort, String userName, String passwrod)
HttpVisitorsetProxy in interface HttpVisitorproxyHost - 代理服务器主机域名或IPproxyPort - 代理端口userName - 用户名passwrod - 密码public void setBasicAuth(String host, int port, String realm, String schema, String username, String password)
HttpVisitorsetBasicAuth in interface HttpVisitorhost - port - realm - schema - username - password - public void setBasicAuth(String host, int port, String username, String password)
HttpVisitorsetBasicAuth in interface HttpVisitorhost - 服务器主机域名或IPport - 端口username - 用户名password - 密码public void setAlternateAuth(String host, int port, String username, String password, List<String> schemaList)
HttpVisitorsetAlternateAuth in interface HttpVisitorschemaList - 支持的Schame列表public String getRequestCharset()
public void setRequestCharset(String requestCharset)
HttpVisitorsetRequestCharset in interface HttpVisitorpublic String getResponseCharset()
public void setResponseCharset(String charset)
HttpVisitorsetResponseCharset in interface HttpVisitorpublic void setTimeout(int timeout)
HttpVisitorsetTimeout in interface HttpVisitorpublic void init()
HttpVisitorinit in interface HttpVisitorpublic String getUrl(String url, Map<String,?> parameter)
HttpVisitorgetUrl in interface HttpVisitorurl - 要访问的URLparameter - 要访问的参数public String postUrl(String url, Map<String,?> parameter)
HttpVisitorpostUrl in interface HttpVisitorurl - 要访问的URLparameter - 要访问的参数public org.apache.commons.httpclient.HttpClient getHttpClient()
HttpVisitorgetHttpClient in interface HttpVisitorpublic void addCookie(org.apache.commons.httpclient.Cookie cookie)
HttpVisitoraddCookie in interface HttpVisitorpublic org.apache.commons.httpclient.Cookie[] getCookies()
HttpVisitorgetCookies in interface HttpVisitorpublic String postSoap(String url, String soapAction, String xmlEntiry)
HttpVisitorpostSoap in interface HttpVisitorpublic String postSoap(String url, String xmlEntiry)
HttpVisitorpostSoap in interface HttpVisitorpublic String postXml(String url, String xmlEntiry)
HttpVisitorpostXml in interface HttpVisitorpublic void setHeaderMap(Map<String,String> headerMap)
HttpVisitorsetHeaderMap in interface HttpVisitorpublic HttpVisitor setHeader(String key, String value)
HttpVisitorsetHeader in interface HttpVisitorpublic void addCookie(org.apache.commons.httpclient.Cookie[] cookies)
HttpVisitoraddCookie in interface HttpVisitorpublic org.apache.commons.httpclient.HttpState getHttpState()
HttpVisitorgetHttpState in interface HttpVisitorCopyright © 2006–2018 TinyGroup. All rights reserved.