public class NettyHttpClient extends Object implements IHttpClient
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
NettyHttpClient.BaseCallback |
IHttpClient.RequestMethod_gson, CHARSET, CONNECT_TIMED_OUT_MESSAGE, CONTENT_TYPE_FORM, CONTENT_TYPE_JSON, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_MAX_RETRY_TIMES, DEFAULT_READ_TIMEOUT, IO_ERROR_MESSAGE, JPUSH_USER_AGENT, RATE_LIMIT_QUOTA, RATE_LIMIT_Remaining, RATE_LIMIT_Reset, READ_TIMED_OUT_MESSAGE, RESPONSE_OK| 构造器和说明 |
|---|
NettyHttpClient(String authCode,
HttpProxy proxy,
ClientConfig config) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
send(io.netty.buffer.ByteBuf body,
io.netty.handler.codec.http.HttpMethod method,
URI uri) |
ResponseWrapper |
sendDelete(String url) |
ResponseWrapper |
sendDelete(String url,
String content) |
ResponseWrapper |
sendGet(String url) |
ResponseWrapper |
sendGet(String url,
String content) |
ResponseWrapper |
sendPost(String url,
String content) |
ResponseWrapper |
sendPut(String url,
String content) |
void |
sendRequest(io.netty.handler.codec.http.HttpMethod method,
String content,
URI uri,
NettyHttpClient.BaseCallback callback) |
public NettyHttpClient(String authCode, HttpProxy proxy, ClientConfig config)
public void sendRequest(io.netty.handler.codec.http.HttpMethod method,
String content,
URI uri,
NettyHttpClient.BaseCallback callback)
public ResponseWrapper sendGet(String url) throws APIConnectionException, APIRequestException
sendGet 在接口中 IHttpClientAPIConnectionExceptionAPIRequestExceptionpublic ResponseWrapper sendGet(String url, String content) throws APIConnectionException, APIRequestException
public ResponseWrapper sendPut(String url, String content) throws APIConnectionException, APIRequestException
sendPut 在接口中 IHttpClientAPIConnectionExceptionAPIRequestExceptionpublic ResponseWrapper sendPost(String url, String content) throws APIConnectionException, APIRequestException
sendPost 在接口中 IHttpClientAPIConnectionExceptionAPIRequestExceptionpublic ResponseWrapper sendDelete(String url) throws APIConnectionException, APIRequestException
sendDelete 在接口中 IHttpClientAPIConnectionExceptionAPIRequestExceptionpublic ResponseWrapper sendDelete(String url, String content) throws APIConnectionException, APIRequestException
public void send(io.netty.buffer.ByteBuf body,
io.netty.handler.codec.http.HttpMethod method,
URI uri)
public void close()
Copyright © 2017. All Rights Reserved.