public interface SimpleHttp
| Modifier and Type | Method and Description |
|---|---|
SimpleHttpResponse |
get(String url)
get 请求
|
SimpleHttpResponse |
get(String url,
Map<String,String> params)
get 请求
|
SimpleHttpResponse |
post(String url)
post请求
|
SimpleHttpResponse |
post(String url,
String dataJson)
post请求
|
SimpleHttpResponse |
post(String url,
String dataJson,
HttpHeader header)
post请求
|
SimpleHttpResponse |
postFile(String url,
String name,
File file)
post multipart/form-data 文件上传
|
SimpleHttpResponse |
postFile(String url,
String name,
String filename,
byte[] fileBytes)
post multipart/form-data 文件上传
|
SimpleHttpResponse |
postFormFile(String url,
Map<String,Object> formData)
post multipart/form-data 文件上传
|
SimpleHttpResponse |
postFormFile(String url,
Map<String,Object> formData,
HttpHeader header)
post multipart/form-data 文件上传
|
SimpleHttpResponse |
postFormStr(String url,
Map<String,String> formdata)
post 表单请求
|
SimpleHttpResponse |
postFormStr(String url,
Map<String,String> formData,
HttpHeader header)
post 表单请求
|
SimpleHttpResponse get(String url)
url - 请求地址SimpleHttpResponse get(String url, Map<String,String> params)
url - 请求地址params - 请求参数SimpleHttpResponse post(String url)
url - 请求地址SimpleHttpResponse post(String url, String dataJson)
url - 请求地址dataJson - 请求参数,json格式SimpleHttpResponse post(String url, String dataJson, HttpHeader header)
url - 请求地址dataJson - 请求参数,json格式header - 一次性请求头SimpleHttpResponse postFormStr(String url, Map<String,String> formdata)
url - 请求地址formdata - form 参数SimpleHttpResponse postFormStr(String url, Map<String,String> formData, HttpHeader header)
url - 请求地址formData - 表单参数header - 请求头SimpleHttpResponse postFile(String url, String name, String filename, byte[] fileBytes)
url - 请求地址name - 参数名称filename - 文件名称fileBytes - 需要上传的文件SimpleHttpResponse postFile(String url, String name, File file)
url - 请求地址name - 参数名称file - 文件SimpleHttpResponse postFormFile(String url, Map<String,Object> formData)
url - urlformData - 文件上传参数SimpleHttpResponse postFormFile(String url, Map<String,Object> formData, HttpHeader header)
url - urlformData - 文件上传参数header - 请求头Copyright © 2023. All rights reserved.