Class OkHttpRedirectNopInterceptor

  • All Implemented Interfaces:
    okhttp3.Interceptor , pro.fessional.wings.slardar.httprest.okhttp.OkHttpInterceptor

    
    public class OkHttpRedirectNopInterceptor
     implements OkHttpInterceptor
                        

    When followingRedirects, change the Location header to Nop-Location according to the request's header setting, thus can stop the Redirects for this request.

    see RetryAndFollowUpInterceptor#followUpRequest

    Since:

    2022-11-01

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Response intercept(@NotNull() Interceptor.Chain chain)
      boolean isNetwork()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OkHttpRedirectNopInterceptor

        OkHttpRedirectNopInterceptor()
    • Method Detail

      • intercept

        @NotNull() Response intercept(@NotNull() Interceptor.Chain chain)