类 HttpRequest
java.lang.Object
com.sh.common.net.http.HttpRequest
Description: HTTP请求
Title:首亨软件 - CRM、TSS、ERP等信息化管理软件
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明默认的响应字符集static void发送GET请求发送GET请求发送GET请求发送POST请求发送POST请求发送POST请求voidsetDefaultContentEncoding(String defaultContentEncoding) 设置默认的响应字符集
-
构造器详细资料
-
HttpRequest
public HttpRequest() -
HttpRequest
-
-
方法详细资料
-
sendGet
发送GET请求- 参数:
urlString- URL地址- 返回:
- 响应对象
- 抛出:
IOException- IOException
-
sendGet
发送GET请求- 参数:
urlString- URL地址params- 参数集合- 返回:
- 响应对象
- 抛出:
IOException- IOException
-
sendGet
public HttpRespons sendGet(String urlString, Map<String, String> params, Map<String, throws IOExceptionString> propertys) 发送GET请求- 参数:
urlString- URL地址params- 参数集合propertys- 请求属性- 返回:
- 响应对象
- 抛出:
IOException- IOException
-
sendPost
发送POST请求- 参数:
urlString- URL地址- 返回:
- 响应对象
- 抛出:
IOException- IOException
-
sendPost
发送POST请求- 参数:
urlString- URL地址params- 参数集合- 返回:
- HttpRespons
- 抛出:
IOException- IOException
-
sendPost
public HttpRespons sendPost(String urlString, Map<String, String> params, Map<String, throws IOExceptionString> propertys) 发送POST请求- 参数:
urlString- URL地址params- 参数集合propertys- 请求属性- 返回:
- 响应对象
- 抛出:
IOException- IOException
-
getDefaultContentEncoding
默认的响应字符集- 返回:
- String
-
setDefaultContentEncoding
设置默认的响应字符集- 参数:
defaultContentEncoding- String
-
main
-