ChaosHttpHandler Class

  • java.lang.Object
    • com.microsoft.graph.httpcore.ChaosHttpHandler

Implements

okhttp3.Interceptor

public class ChaosHttpHandler
implements okhttp3.Interceptor

DO NOT USE IN PRODUCTION interceptor that randomly fails the responses for unit testing purposes

Field Summary

Modifier and Type Field and Description
final MiddlewareType MIDDLEWARE_TYPE

The current middleware type

static final int MSClientErrorCodeTooManyRequests

Too many requests status code

Constructor Summary

Constructor Description
ChaosHttpHandler()

Method Summary

Modifier and Type Method and Description
okhttp3.Response intercept(Interceptor.Chain chain)

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

MIDDLEWARE_TYPE

public final MiddlewareType MIDDLEWARE_TYPE

The current middleware type

MSClientErrorCodeTooManyRequests

public static final int MSClientErrorCodeTooManyRequests

Too many requests status code

Constructor Details

ChaosHttpHandler

public ChaosHttpHandler()

Method Details

intercept

public Response intercept(Interceptor.Chain chain)

Parameters:

chain

Throws:

java.io.IOException

Applies to