com.alibaba.rocketmq.common.utils
类 HttpTinyClient

java.lang.Object
  继承者 com.alibaba.rocketmq.common.utils.HttpTinyClient

public class HttpTinyClient
extends Object

HTTP 简易客户端

作者:
manhong.yqd

嵌套类摘要
static class HttpTinyClient.HttpResult
           
 
构造方法摘要
HttpTinyClient()
           
 
方法摘要
static HttpTinyClient.HttpResult httpGet(String url, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs)
          发送GET请求。
static HttpTinyClient.HttpResult httpPost(String url, List<String> headers, List<String> paramValues, String encoding, long readTimeoutMs)
          发送POST请求。
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

HttpTinyClient

public HttpTinyClient()
方法详细信息

httpGet

public static HttpTinyClient.HttpResult httpGet(String url,
                                                List<String> headers,
                                                List<String> paramValues,
                                                String encoding,
                                                long readTimeoutMs)
                                         throws IOException
发送GET请求。

抛出:
IOException

httpPost

public static HttpTinyClient.HttpResult httpPost(String url,
                                                 List<String> headers,
                                                 List<String> paramValues,
                                                 String encoding,
                                                 long readTimeoutMs)
                                          throws IOException
发送POST请求。

参数:
url -
headers - 请求Header,可以为null
paramValues - 参数,可以为null
encoding - URL编码使用的字符集
readTimeoutMs - 响应超时
返回:
抛出:
IOException


Copyright © 2012-2015. All Rights Reserved.