本文整理了Java中reactor.netty.http.client.HttpClient.doOnResponseError()
方法的一些代码示例,展示了HttpClient.doOnResponseError()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpClient.doOnResponseError()
方法的具体详情如下:
包路径:reactor.netty.http.client.HttpClient
类名称:HttpClient
方法名:doOnResponseError
[英]Setup a callback called when HttpClientResponse has not been fully received.
[中]设置在未完全接收HttpClientResponse时调用的回调。
代码示例来源:origin: spring-cloud/spring-cloud-sleuth
@Override
public Object postProcessAfterInitialization(Object bean, String beanName)
throws BeansException {
if (bean instanceof HttpClient) {
return ((HttpClient) bean).mapConnect(new TracingMapConnect(this.beanFactory))
.doOnRequest(TracingDoOnRequest.create(this.beanFactory))
.doOnRequestError(TracingDoOnErrorRequest.create(this.beanFactory))
.doOnResponse(TracingDoOnResponse.create(this.beanFactory))
.doOnResponseError(TracingDoOnErrorResponse.create(this.beanFactory));
}
return bean;
}
代码示例来源:origin: org.springframework.cloud/spring-cloud-sleuth-core
@Override
public Object postProcessAfterInitialization(Object bean, String beanName)
throws BeansException {
if (bean instanceof HttpClient) {
return ((HttpClient) bean).mapConnect(new TracingMapConnect(this.beanFactory))
.doOnRequest(TracingDoOnRequest.create(this.beanFactory))
.doOnRequestError(TracingDoOnErrorRequest.create(this.beanFactory))
.doOnResponse(TracingDoOnResponse.create(this.beanFactory))
.doOnResponseError(TracingDoOnErrorResponse.create(this.beanFactory));
}
return bean;
}
代码示例来源:origin: reactor/reactor-netty
.doOnRequestError((req, err) ->
requestError.incrementAndGet())
.doOnResponseError((res, err) ->
responseError.incrementAndGet())
.get()
内容来源于网络,如有侵权,请联系作者删除!