@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)
HttpVisitor
setProxy
in interface HttpVisitor
proxyHost
- 代理服务器主机域名或IPproxyPort
- 代理端口userName
- 用户名passwrod
- 密码public void setBasicAuth(String host, int port, String realm, String schema, String username, String password)
HttpVisitor
setBasicAuth
in interface HttpVisitor
host
- port
- realm
- schema
- username
- password
- public void setBasicAuth(String host, int port, String username, String password)
HttpVisitor
setBasicAuth
in interface HttpVisitor
host
- 服务器主机域名或IPport
- 端口username
- 用户名password
- 密码public void setAlternateAuth(String host, int port, String username, String password, List<String> schemaList)
HttpVisitor
setAlternateAuth
in interface HttpVisitor
schemaList
- 支持的Schame列表public String getRequestCharset()
public void setRequestCharset(String requestCharset)
HttpVisitor
setRequestCharset
in interface HttpVisitor
public String getResponseCharset()
public void setResponseCharset(String charset)
HttpVisitor
setResponseCharset
in interface HttpVisitor
public void setTimeout(int timeout)
HttpVisitor
setTimeout
in interface HttpVisitor
public void init()
HttpVisitor
init
in interface HttpVisitor
public String getUrl(String url, Map<String,?> parameter)
HttpVisitor
getUrl
in interface HttpVisitor
url
- 要访问的URLparameter
- 要访问的参数public String postUrl(String url, Map<String,?> parameter)
HttpVisitor
postUrl
in interface HttpVisitor
url
- 要访问的URLparameter
- 要访问的参数public org.apache.commons.httpclient.HttpClient getHttpClient()
HttpVisitor
getHttpClient
in interface HttpVisitor
public void addCookie(org.apache.commons.httpclient.Cookie cookie)
HttpVisitor
addCookie
in interface HttpVisitor
public org.apache.commons.httpclient.Cookie[] getCookies()
HttpVisitor
getCookies
in interface HttpVisitor
public String postSoap(String url, String soapAction, String xmlEntiry)
HttpVisitor
postSoap
in interface HttpVisitor
public String postSoap(String url, String xmlEntiry)
HttpVisitor
postSoap
in interface HttpVisitor
public String postXml(String url, String xmlEntiry)
HttpVisitor
postXml
in interface HttpVisitor
public void setHeaderMap(Map<String,String> headerMap)
HttpVisitor
setHeaderMap
in interface HttpVisitor
public HttpVisitor setHeader(String key, String value)
HttpVisitor
setHeader
in interface HttpVisitor
public void addCookie(org.apache.commons.httpclient.Cookie[] cookies)
HttpVisitor
addCookie
in interface HttpVisitor
public org.apache.commons.httpclient.HttpState getHttpState()
HttpVisitor
getHttpState
in interface HttpVisitor
Copyright © 2006–2018 TinyGroup. All rights reserved.