public class NettyHttpClient extends java.lang.Object implements IHttpClient
| Modifier and Type | Class and Description |
|---|---|
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| Constructor and Description |
|---|
NettyHttpClient(java.lang.String authCode,
HttpProxy proxy,
ClientConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
send(io.netty.buffer.ByteBuf body,
io.netty.handler.codec.http.HttpMethod method,
java.net.URI uri) |
ResponseWrapper |
sendDelete(java.lang.String url) |
ResponseWrapper |
sendDelete(java.lang.String url,
java.lang.String content) |
ResponseWrapper |
sendGet(java.lang.String url) |
ResponseWrapper |
sendGet(java.lang.String url,
java.lang.String content) |
ResponseWrapper |
sendPost(java.lang.String url,
java.lang.String content) |
ResponseWrapper |
sendPut(java.lang.String url,
java.lang.String content) |
void |
sendRequest(io.netty.handler.codec.http.HttpMethod method,
java.lang.String content,
java.net.URI uri,
NettyHttpClient.BaseCallback callback) |
public NettyHttpClient(java.lang.String authCode,
HttpProxy proxy,
ClientConfig config)
public void sendRequest(io.netty.handler.codec.http.HttpMethod method,
java.lang.String content,
java.net.URI uri,
NettyHttpClient.BaseCallback callback)
public ResponseWrapper sendGet(java.lang.String url) throws APIConnectionException, APIRequestException
sendGet in interface IHttpClientAPIConnectionExceptionAPIRequestExceptionpublic ResponseWrapper sendGet(java.lang.String url, java.lang.String content) throws APIConnectionException, APIRequestException
sendGet in interface IHttpClientAPIConnectionExceptionAPIRequestExceptionpublic ResponseWrapper sendPut(java.lang.String url, java.lang.String content) throws APIConnectionException, APIRequestException
sendPut in interface IHttpClientAPIConnectionExceptionAPIRequestExceptionpublic ResponseWrapper sendPost(java.lang.String url, java.lang.String content) throws APIConnectionException, APIRequestException
sendPost in interface IHttpClientAPIConnectionExceptionAPIRequestExceptionpublic ResponseWrapper sendDelete(java.lang.String url) throws APIConnectionException, APIRequestException
sendDelete in interface IHttpClientAPIConnectionExceptionAPIRequestExceptionpublic ResponseWrapper sendDelete(java.lang.String url, java.lang.String content) throws APIConnectionException, APIRequestException
sendDelete in interface IHttpClientAPIConnectionExceptionAPIRequestExceptionpublic void send(io.netty.buffer.ByteBuf body,
io.netty.handler.codec.http.HttpMethod method,
java.net.URI uri)
public void close()
Copyright © 2019. All Rights Reserved.