Class ChaosHttpHandler

java.lang.Object
com.microsoft.graph.httpcore.ChaosHttpHandler
All Implemented Interfaces:
okhttp3.Interceptor

public class ChaosHttpHandler extends Object implements okhttp3.Interceptor
DO NOT USE IN PRODUCTION interceptor that randomly fails the responses for unit testing purposes
  • Field Details

    • MIDDLEWARE_TYPE

      public final MiddlewareType MIDDLEWARE_TYPE
      The current middleware type
    • MSClientErrorCodeTooManyRequests

      public static final int MSClientErrorCodeTooManyRequests
      Too many requests status code
      See Also:
      Constant Field Values
  • Constructor Details

    • ChaosHttpHandler

      public ChaosHttpHandler()
  • Method Details

    • intercept

      @Nonnull public okhttp3.Response intercept(@Nonnull okhttp3.Interceptor.Chain chain) throws IOException
      Specified by:
      intercept in interface okhttp3.Interceptor
      Throws:
      IOException