类 AbstractWebClientTemplate
java.lang.Object
cn.herodotus.stirrup.openapi.core.definition.AbstractWebClientTemplate
- 所有已实现的接口:
WebClientTemplate
Description: WebClient 请求操作抽象封装
- 作者:
- : gengwei.zheng
- Date:
- : 2024/2/27 21:46
-
构造器概要
构造器构造器说明AbstractWebClientTemplate(org.springframework.web.reactive.function.client.WebClient webClient) -
方法概要
修饰符和类型方法说明protected abstract Function<org.springframework.web.reactive.function.client.ClientRequest, reactor.core.publisher.Mono<org.springframework.web.reactive.function.client.ClientRequest>> <I extends AbstractRequest,O extends Response>
reactor.core.publisher.Mono<O> QueryParams 类型参数的 DELETE 请求<I extends AbstractRequest,O extends Response>
reactor.core.publisher.Mono<O> deleteWithFormUrlEncoded(String endpoint, I request) ContentType 为 "application/x-www-form-urlencoded" 类型的 DELETE 请求封装,<I extends AbstractRequest,O extends Response>
reactor.core.publisher.Mono<O> QueryParams 类型参数的 GET 请求protected abstract Stringorg.springframework.core.convert.converter.Converter<Map<String, Object>, org.springframework.util.MultiValueMap<String, String>> WebClient Map 参数转换器org.springframework.web.reactive.function.client.WebClient获取到 WebClient<I extends AbstractRequest,O extends Response>
reactor.core.publisher.Mono<O> postWithFormUrlEncoded(String endpoint, I request) ContentType 为 "application/x-www-form-urlencoded" 类型的 POST 请求封装,<I extends AbstractRequest,O extends Response>
reactor.core.publisher.Mono<O> putWithFormUrlEncoded(String endpoint, I request) ContentType 为 "application/x-www-form-urlencoded" 类型的 PUT 请求封装,从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 cn.herodotus.stirrup.openapi.core.definition.WebClientTemplate
base, delete, delete, delete, deleteWithFormUrlEncoded, deleteWithFormUrlEncoded, deleteWithFormUrlEncoded, deleteWithPathVariables, deleteWithPathVariables, formUrlEncoded, get, get, get, get, getWithPathVariables, json, onErrorResume, post, post, postWithFormUrlEncoded, postWithFormUrlEncoded, put, put, putWithFormUrlEncoded, putWithFormUrlEncoded, request
-
构造器详细资料
-
AbstractWebClientTemplate
public AbstractWebClientTemplate(org.springframework.web.reactive.function.client.WebClient webClient)
-
-
方法详细资料
-
getMultiValueMapConverter
public org.springframework.core.convert.converter.Converter<Map<String,Object>, getMultiValueMapConverter()org.springframework.util.MultiValueMap<String, String>> 从接口复制的说明:WebClientTemplateWebClient Map 参数转换器- 指定者:
getMultiValueMapConverter在接口中WebClientTemplate- 返回:
- 转换器
Converter
-
getWebClient
public org.springframework.web.reactive.function.client.WebClient getWebClient()从接口复制的说明:WebClientTemplate获取到 WebClient- 指定者:
getWebClient在接口中WebClientTemplate- 返回:
WebClient
-
authentication
protected abstract Function<org.springframework.web.reactive.function.client.ClientRequest,reactor.core.publisher.Mono<org.springframework.web.reactive.function.client.ClientRequest>> authentication() -
getBaseUrl
-
get
public <I extends AbstractRequest,O extends Response> reactor.core.publisher.Mono<O> get(String endpoint, I request) QueryParams 类型参数的 GET 请求- 类型参数:
I- 请求数据类型,只能为AbstractRequest子类O- 响应数据类型- 参数:
endpoint- 请求 APIrequest- 继承AbstractRequest并且设置了 Map 的参数对象- 返回:
- 自定义响应结果。如果出错,则结果内容为错误信息
-
delete
public <I extends AbstractRequest,O extends Response> reactor.core.publisher.Mono<O> delete(String endpoint, I request) QueryParams 类型参数的 DELETE 请求- 类型参数:
I- 请求数据类型,只能为AbstractRequest子类O- 响应数据类型- 参数:
endpoint- 请求 APIrequest- 继承AbstractRequest并且设置了 Map 的参数对象- 返回:
- 自定义响应结果。如果出错,则结果内容为错误信息
-
deleteWithFormUrlEncoded
public <I extends AbstractRequest,O extends Response> reactor.core.publisher.Mono<O> deleteWithFormUrlEncoded(String endpoint, I request) ContentType 为 "application/x-www-form-urlencoded" 类型的 DELETE 请求封装,- 类型参数:
I- 请求数据类型,只能为AbstractRequest子类O- 响应数据类型- 参数:
endpoint- 请求 APIrequest- 继承AbstractRequest并且设置了 Map 的参数对象- 返回:
- 自定义响应结果。如果出错,则结果内容为错误信息
-
postWithFormUrlEncoded
public <I extends AbstractRequest,O extends Response> reactor.core.publisher.Mono<O> postWithFormUrlEncoded(String endpoint, I request) ContentType 为 "application/x-www-form-urlencoded" 类型的 POST 请求封装,- 类型参数:
I- 请求数据类型,只能为AbstractRequest子类O- 响应数据类型- 参数:
endpoint- 请求 APIrequest- 继承AbstractRequest并且设置了 Map 的参数对象- 返回:
- 自定义响应结果。如果出错,则结果内容为错误信息
-
putWithFormUrlEncoded
public <I extends AbstractRequest,O extends Response> reactor.core.publisher.Mono<O> putWithFormUrlEncoded(String endpoint, I request) ContentType 为 "application/x-www-form-urlencoded" 类型的 PUT 请求封装,- 类型参数:
I- 请求数据类型,只能为AbstractRequest子类O- 响应数据类型- 参数:
endpoint- 请求 APIrequest- 继承AbstractRequest并且设置了 Map 的参数对象- 返回:
- 自定义响应结果。如果出错,则结果内容为错误信息
-