public class SimpleHttpClient extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CHARSET_NAME_GBK |
static String |
CHARSET_NAME_UTF_8 |
static int |
ConnectTimeout |
static String |
Content_Type_form |
static String |
Content_Type_json |
static String |
Content_Type_urlencoded |
static String |
Content_Type_xml |
static int |
ReadTimeout |
| 构造器和说明 |
|---|
SimpleHttpClient() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ResponseResult |
deleteByJson(String httpUrl,
com.alibaba.fastjson2.JSONObject param,
String charsetName,
Map<String,String> headers,
String cookiesText,
Proxy proxy) |
static ResponseResult |
deleteByJson(String httpUrl,
String param,
String charsetName,
Map<String,String> headers,
String cookiesText,
Proxy proxy) |
static ResponseResult |
demoAddUser(com.alibaba.fastjson2.JSONObject json) |
static void |
downFile(String httpUrl,
String outputFile,
Map<String,String> headers,
String cookiesText,
Proxy proxy) |
static ResponseResult |
get(String httpUrl,
String charsetName,
Map<String,String> headers,
String cookiesText,
Proxy proxy) |
static String |
getBasicAuth(String authUsername,
String authPassword) |
static byte[] |
getUrlFileBytes(String httpUrl,
Map<String,String> headers,
String cookiesText,
Proxy proxy) |
static ResponseResult |
postByJson(String httpUrl,
com.alibaba.fastjson2.JSONObject param,
String charsetName,
Map<String,String> headers,
String cookiesText,
Proxy proxy) |
static ResponseResult |
postByJson(String httpUrl,
String param,
String charsetName,
Map<String,String> headers,
String cookiesText,
Proxy proxy) |
static ResponseResult |
postUrlEncoded(String httpUrl,
com.alibaba.fastjson2.JSONObject param,
String charsetName,
Map<String,String> headers,
String cookiesText,
Proxy proxy) |
static ResponseResult |
putByJson(String httpUrl,
com.alibaba.fastjson2.JSONObject param,
String charsetName,
Map<String,String> headers,
String cookiesText,
Proxy proxy) |
static ResponseResult |
putByJson(String httpUrl,
String param,
String charsetName,
Map<String,String> headers,
String cookiesText,
Proxy proxy) |
public static int ConnectTimeout
public static int ReadTimeout
public static String Content_Type_urlencoded
public static String Content_Type_form
public static String Content_Type_json
public static String Content_Type_xml
public static ResponseResult get(String httpUrl, String charsetName, Map<String,String> headers, String cookiesText, Proxy proxy)
public static ResponseResult postUrlEncoded(String httpUrl, com.alibaba.fastjson2.JSONObject param, String charsetName, Map<String,String> headers, String cookiesText, Proxy proxy)
public static ResponseResult postByJson(String httpUrl, com.alibaba.fastjson2.JSONObject param, String charsetName, Map<String,String> headers, String cookiesText, Proxy proxy)
public static ResponseResult putByJson(String httpUrl, com.alibaba.fastjson2.JSONObject param, String charsetName, Map<String,String> headers, String cookiesText, Proxy proxy)
public static ResponseResult deleteByJson(String httpUrl, com.alibaba.fastjson2.JSONObject param, String charsetName, Map<String,String> headers, String cookiesText, Proxy proxy)
public static ResponseResult postByJson(String httpUrl, String param, String charsetName, Map<String,String> headers, String cookiesText, Proxy proxy)
public static ResponseResult putByJson(String httpUrl, String param, String charsetName, Map<String,String> headers, String cookiesText, Proxy proxy)
public static ResponseResult deleteByJson(String httpUrl, String param, String charsetName, Map<String,String> headers, String cookiesText, Proxy proxy)
public static byte[] getUrlFileBytes(String httpUrl, Map<String,String> headers, String cookiesText, Proxy proxy) throws Exception
Exceptionpublic static void downFile(String httpUrl, String outputFile, Map<String,String> headers, String cookiesText, Proxy proxy) throws Exception
Exceptionpublic static ResponseResult demoAddUser(com.alibaba.fastjson2.JSONObject json)
Copyright © 2024. All rights reserved.