public class MyHttpsClient extends Object implements MyAbstractHttp
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CHARSET_GBK |
static String |
CHARSET_UTF8 |
String |
contentType |
static String |
CONTENTTYPE_APPLICATION_JSON |
static String |
CONTENTTYPE_APPLICATION_JSON_UTF8 |
static String |
CONTENTTYPE_TEXT_HTML_UTF8 |
int |
defaultByteSize |
static String |
DELETE |
static String |
GET |
static String |
POST |
static String |
PUT |
| 构造器和说明 |
|---|
MyHttpsClient() |
MyHttpsClient(String _url) |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
get()
GET 请求
|
String |
get(String url)
GET 请求
|
static String |
httpsRequest(String requestUrl,
HttpMethod requestMethod,
String outputStr)
发起https请求并获取结果
|
String |
post(String jsonParam)
POST 请求
|
String |
post(String url,
String jsonParam)
POST 请求
|
void |
setContentType(String contentType) |
void |
setDefaultByteSize(int defaultByteSize) |
public String contentType
public static final String CONTENTTYPE_APPLICATION_JSON_UTF8
public int defaultByteSize
public MyHttpsClient()
public MyHttpsClient(String _url)
public void setContentType(String contentType)
public void setDefaultByteSize(int defaultByteSize)
public static String httpsRequest(String requestUrl, HttpMethod requestMethod, String outputStr)
requestUrl - 请求地址requestMethod - 请求方式(GET、POST)HttpMethodoutputStr - 提交的数据,POST时有效 JSON字符串public String post(String url, String jsonParam)
MyAbstractHttppost 在接口中 MyAbstractHttpjsonParam - 提交的数据,POST时有效 JSON字符串public String post(String jsonParam)
MyAbstractHttppost 在接口中 MyAbstractHttppublic String get(String url)
MyAbstractHttpget 在接口中 MyAbstractHttppublic String get()
MyAbstractHttpget 在接口中 MyAbstractHttpCopyright © 2020. All rights reserved.