Interface HttpInterceptor.Chain

Enclosing interface:
HttpInterceptor

public static interface HttpInterceptor.Chain
Forwards a request through the remaining interceptor chain and ultimately the network. Each HttpInterceptor receives a fresh Chain positioned at the next interceptor.
  • Method Summary

    Modifier and Type
    Method
    Description
    Sends request through the remaining interceptors and the network.
    The outbound request as seen at this position in the chain.
  • Method Details

    • request

      HttpRequest request()
      The outbound request as seen at this position in the chain. Earlier interceptors may have replaced it with a different request.
    • proceed

      HttpResponse<String> proceed(HttpRequest request) throws IOException
      Sends request through the remaining interceptors and the network. The returned response has not yet passed through any later interceptors — interceptors that wrap this call may transform it before returning.
      Parameters:
      request - the request to forward (must not be null)
      Returns:
      the response from the next interceptor or the network
      Throws:
      IOException - if any downstream stage fails