public class HttpService extends Object implements org.springframework.beans.factory.DisposableBean
| 构造器和说明 |
|---|
HttpService(org.asynchttpclient.AsyncHttpClientConfig config,
RetryService retryService)
注册关闭函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
destroy() |
RequestBuilder |
get()
创建一个builder
|
RequestBuilder |
method(io.netty.handler.codec.http.HttpMethod method)
创建一个builder
|
RequestBuilder |
post()
创建一个builder
|
RequestBuilder |
postJson()
创建一个builder: 严格 json 格式的参数, 在body 中传递 json 数据
|
HttpService |
sslConfig(io.netty.handler.ssl.SslContext sslContext)
通过配置创建 Http服务
|
HttpService |
start()
通过配置创建 Http服务
|
public HttpService(org.asynchttpclient.AsyncHttpClientConfig config,
RetryService retryService)
public HttpService start()
config - public HttpService sslConfig(io.netty.handler.ssl.SslContext sslContext) throws RuntimeException
config - SSLExceptionRuntimeExceptionpublic RequestBuilder post()
public RequestBuilder postJson()
public RequestBuilder get()
public RequestBuilder method(io.netty.handler.codec.http.HttpMethod method)
Copyright © 2021. All rights reserved.