类 HttpUtils
java.lang.Object
com.walker.remote.util.HttpUtils
-
方法概要
修饰符和类型方法说明static List<org.apache.hc.core5.http.NameValuePair>doTranslatePairs(String json) 把json格式参数转换为特定http参数static List<org.apache.hc.core5.http.NameValuePair>doTranslatePairs(Map<String, String> simpleData) org.apache.hc.client5.http.classic.HttpClientorg.apache.hc.client5.http.classic.HttpClientgetHttpClientWithCookie(org.apache.hc.client5.http.cookie.CookieStore cookieStore) 返回设置过cookie的httpClient对象,每次都要新创建org.apache.hc.client5.http.classic.HttpClientgetHttpDoubleTrustClient(DoubleTrust doubleTrust, org.apache.hc.client5.http.cookie.CookieStore cookieStore) 返回一个双向认证的HttpClient对象。static HttpUtilsgetNewRemoteAccessor(String remoteURL, AbstractByteCoder contentCoder, DoubleTrust doubleTrust) 返回一个通用的远程访问对象
-
方法详细资料
-
getInstance
-
getHttpClient
public org.apache.hc.client5.http.classic.HttpClient getHttpClient() -
getHttpClientWithCookie
public org.apache.hc.client5.http.classic.HttpClient getHttpClientWithCookie(org.apache.hc.client5.http.cookie.CookieStore cookieStore) 返回设置过cookie的httpClient对象,每次都要新创建- 参数:
cookieStore-- 返回:
-
getHttpDoubleTrustClient
public org.apache.hc.client5.http.classic.HttpClient getHttpDoubleTrustClient(DoubleTrust doubleTrust, org.apache.hc.client5.http.cookie.CookieStore cookieStore) 返回一个双向认证的HttpClient对象。 注意:在上层应用中,该方法通常被初始化调用,而不是每次使用都被频繁获取。- 参数:
doubleTrust-- 返回:
-
doTranslatePairs
-
doTranslatePairs
把json格式参数转换为特定http参数- 参数:
json-- 返回:
-
getNewRemoteAccessor
public RemoteAccessor getNewRemoteAccessor(String remoteURL, AbstractByteCoder contentCoder, DoubleTrust doubleTrust) 返回一个通用的远程访问对象- 参数:
contentCoder-- 返回:
-