public class HttpUtils extends Object
| 构造器和说明 |
|---|
HttpUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
sendHttp(HttpRequestMethedEnum requestMethod,
String url,
Map<String,String> header,
String params,
int isHttps)
发送http请求
|
static String |
sendHttp2(HttpRequestMethedEnum requestMethod,
String url,
Map<String,String> header,
Map<String,Object> params,
int isHttps)
发送http请求
|
static String |
sendHttpput(String url,
byte[] filebytes,
Map<String,String> header,
int isHttps) |
public static String sendHttp(HttpRequestMethedEnum requestMethod, String url, Map<String,String> header, String params, int isHttps)
requestMethod - 请求方式(HttpGet、HttpPost、HttpPut、HttpDelete)url - 请求路径header - 请求头params - post请求参数isHttps - int :1为是https方式,0为http方式public static String sendHttp2(HttpRequestMethedEnum requestMethod, String url, Map<String,String> header, Map<String,Object> params, int isHttps)
requestMethod - 请求方式(HttpGet、HttpPost、HttpPut、HttpDelete)url - 请求路径header - 请求头params - post请求参数isHttps - int :1为是https方式,0为http方式Copyright © 2021. All rights reserved.