Interface HttpClientInterceptor

All Known Implementing Classes:
ApiKeyHttpClientInterceptor, BasicAuthHttpClientInterceptor, BearerAuthHttpClientInterceptor, RootUriInterceptor, TelemetryInterceptor

public interface HttpClientInterceptor
Русский: Аннотация позволяет указывать обработчики HTTP ответов на определенные HTTP статус коды
English: Annotation allows you to specify HTTP response handlers for specific HTTP status codes

Пример / Example:
 
 public final class MyHttpClientInterceptor implements HttpClientInterceptor {

    @Override
    public CompletionStage<HttpClientResponse> processRequest(Context ctx, InterceptChain chain, HttpClientRequest request) throws Exception {
      return chain.process(ctx, request);
    }
 }

 @HttpClient(configPath = "my.config")
 public interface MyHttpClient {

     @InterceptWith(MyHttpClientInterceptor.class)
     @HttpRoute(method = HttpMethod.GET, path = "/foo/bar")
     HttpResponseEntity<String> get();
 }
 
 
See Also: