public class ArtemisHttpUtil extends Object
| 构造器和说明 |
|---|
ArtemisHttpUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
doDeleteArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
Map<String,String> querys,
String accept,
String contentType)
delete请求
|
static String |
doGetArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
Map<String,String> querys,
String accept,
String contentType)
get请求
|
static String |
doGetArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
Map<String,String> querys,
String accept,
String contentType,
Map<String,String> header)
get请求
|
static org.apache.http.HttpResponse |
doGetResponse(ArtemisConfig artemisConfig,
Map<String,String> path,
Map<String,String> querys,
String accept,
String contentType,
Map<String,String> header) |
static String |
doPostBytesArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
byte[] bytesBody,
Map<String,String> querys,
String accept,
String contentType)
postBytes请求
|
static String |
doPostBytesArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
byte[] bytesBody,
Map<String,String> querys,
String accept,
String contentType,
Map<String,String> header)
postBytes请求
|
static String |
doPostFileFormArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
Map<String,Object> paramMap,
Map<String,String> querys,
String accept,
String contentType)
postFile请求
|
static String |
doPostFormArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
Map<String,Object> paramMap,
Map<String,String> querys,
String accept,
String contentType)
postForm请求,postForm请求包含query参数和form表单参数
|
static String |
doPostFormArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
Map<String,String> paramMap,
Map<String,String> querys,
String accept,
String contentType,
Map<String,String> header)
postForm请求,postForm请求包含query参数和form表单参数
|
static org.apache.http.HttpResponse |
doPostFormImgArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
Map<String,String> paramMap,
Map<String,String> querys,
String accept,
String contentType,
Map<String,String> header) |
static String |
doPostStringArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
String body,
Map<String,String> querys,
String accept,
String contentType)
postString请求
|
static String |
doPostStringArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
String body,
Map<String,String> querys,
String accept,
String contentType,
Map<String,String> header)
postString请求
|
static org.apache.http.HttpResponse |
doPostStringImgArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
String body,
Map<String,String> querys,
String accept,
String contentType,
Map<String,String> header)
postString请求
|
static String |
doPutBytesArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
byte[] bytesBody,
String accept,
String contentType)
putBytes请求
|
static String |
doPutStringArtemis(ArtemisConfig artemisConfig,
Map<String,String> path,
String body,
String accept,
String contentType)
putString请求
|
public static String doGetArtemis(ArtemisConfig artemisConfig, Map<String,String> path, Map<String,String> querys, String accept, String contentType, Map<String,String> header) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。querys - map类型 get请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值header - Exceptionpublic static String doGetArtemis(ArtemisConfig artemisConfig, Map<String,String> path, Map<String,String> querys, String accept, String contentType) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。querys - map类型 get请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值Exceptionpublic static org.apache.http.HttpResponse doGetResponse(ArtemisConfig artemisConfig, Map<String,String> path, Map<String,String> querys, String accept, String contentType, Map<String,String> header) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。querys - map类型 get请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值header - 请求参数有header以map的方式,没有则为nullExceptionpublic static String doPostFormArtemis(ArtemisConfig artemisConfig, Map<String,String> path, Map<String,String> paramMap, Map<String,String> querys, String accept, String contentType, Map<String,String> header) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。paramMap - Form表单请求的参数,键值对形式的mapquerys - map类型 post请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/x-www-form-urlencoded; charset=UTF-8")header - 请求参数有header以map的方式,没有则为nullExceptionpublic static String doPostFormArtemis(ArtemisConfig artemisConfig, Map<String,String> path, Map<String,Object> paramMap, Map<String,String> querys, String accept, String contentType) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。paramMap - Form表单请求的参数,键值对形式的mapquerys - map类型 post请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/x-www-form-urlencoded; charset=UTF-8")Exceptionpublic static org.apache.http.HttpResponse doPostFormImgArtemis(ArtemisConfig artemisConfig, Map<String,String> path, Map<String,String> paramMap, Map<String,String> querys, String accept, String contentType, Map<String,String> header) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。paramMap - Form表单请求的参数,键值对形式的mapquerys - map类型 post请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/x-www-form-urlencoded; charset=UTF-8")header - 请求参数有header以map的方式,没有则为nullExceptionpublic static String doPostStringArtemis(ArtemisConfig artemisConfig, Map<String,String> path, String body, Map<String,String> querys, String accept, String contentType, Map<String,String> header) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。body - postString String请求体querys - map类型 post请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/text; charset=UTF-8")header - header参数,无过没有值为nullExceptionpublic static String doPostStringArtemis(ArtemisConfig artemisConfig, Map<String,String> path, String body, Map<String,String> querys, String accept, String contentType) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。body - postString String请求体querys - map类型 post请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/text; charset=UTF-8")Exceptionpublic static org.apache.http.HttpResponse doPostStringImgArtemis(ArtemisConfig artemisConfig, Map<String,String> path, String body, Map<String,String> querys, String accept, String contentType, Map<String,String> header) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。body - postString String请求体querys - map类型 post请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/x-www-form-urlencoded; charset=UTF-8")header - 请求参数有header以map的方式,没有则为nullExceptionpublic static String doPostBytesArtemis(ArtemisConfig artemisConfig, Map<String,String> path, byte[] bytesBody, Map<String,String> querys, String accept, String contentType, Map<String,String> header) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。bytesBody - 请求体,byte字节querys - map类型 post请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/text; charset=UTF-8")Exceptionpublic static String doPostBytesArtemis(ArtemisConfig artemisConfig, Map<String,String> path, byte[] bytesBody, Map<String,String> querys, String accept, String contentType) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。bytesBody - 请求体,byte字节querys - map类型 post请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/text; charset=UTF-8")Exceptionpublic static String doPostFileFormArtemis(ArtemisConfig artemisConfig, Map<String,String> path, Map<String,Object> paramMap, Map<String,String> querys, String accept, String contentType) throws Exception
artemisConfig - 请求路径,请求时合作方aksk参数封装类path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。paramMap - form表单请求参数,包含文件querys - map类型 post请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/text; charset=UTF-8")Exceptionpublic static String doPutStringArtemis(ArtemisConfig artemisConfig, Map<String,String> path, String body, String accept, String contentType) throws Exception
path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。body - putString String请求体accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/text; charset=UTF-8")Exceptionpublic static String doPutBytesArtemis(ArtemisConfig artemisConfig, Map<String,String> path, byte[] bytesBody, String accept, String contentType) throws Exception
path - artemis配置的putBytes请求的路径bytesBody - 请求体,byte字节accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值("application/text; charset=UTF-8")Exceptionpublic static String doDeleteArtemis(ArtemisConfig artemisConfig, Map<String,String> path, Map<String,String> querys, String accept, String contentType) throws Exception
path - artemis配置的get请求的路径 是一个数组长度为1的Hashmap集合,只存一组数据,key为http的请求方式,value为host后面的path路径。querys - map类型 delete请求的url查询参数(url中的query参数,没有就是为空)形如 "?aa=1&&bb=2"形式参数变成map键值对 query.put("aa","1");query.put("bb","2")accept - 指定客户端能够接收的内容类型,该参数传空时的默认全部类型接受contentType - 请求的与实体对应的MIME信息,该参数传空时的取默认值ExceptionCopyright © 2023. All rights reserved.