-
- All Implemented Interfaces:
-
okhttp3.Interceptor
public final class ChuckerInterceptor implements InterceptorAn OkHttp Interceptor which persists and displays HTTP activity in your application for later inspection.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classChuckerInterceptor.BuilderAssembles a new ChuckerInterceptor.
-
Constructor Summary
Constructors Constructor Description ChuckerInterceptor(Context context, ChuckerCollector collector, Long maxContentLength, Set<String> headersToRedact, Boolean alwaysReadResponseBody)An OkHttp Interceptor which persists and displays HTTP activity in your application for later inspection. ChuckerInterceptor(Context context, ChuckerCollector collector, Long maxContentLength, Set<String> headersToRedact)An OkHttp Interceptor which persists and displays HTTP activity in your application for later inspection. ChuckerInterceptor(Context context, ChuckerCollector collector, Long maxContentLength)An OkHttp Interceptor which persists and displays HTTP activity in your application for later inspection. ChuckerInterceptor(Context context, ChuckerCollector collector)An OkHttp Interceptor which persists and displays HTTP activity in your application for later inspection. ChuckerInterceptor(Context context)An OkHttp Interceptor which persists and displays HTTP activity in your application for later inspection.
-
Method Summary
Modifier and Type Method Description final UnitredactHeader(String headerName)Adds headerName into headersToRedact Responseintercept(Interceptor.Chain chain)-
-
Constructor Detail
-
ChuckerInterceptor
ChuckerInterceptor(Context context, ChuckerCollector collector, Long maxContentLength, Set<String> headersToRedact, Boolean alwaysReadResponseBody)
An OkHttp Interceptor which persists and displays HTTP activity in your application for later inspection.- Parameters:
context- An Android Contextcollector- A ChuckerCollector to customize data retentionmaxContentLength- The maximum length for request and response content before their truncation.headersToRedact- a Set of headers you want to redact.alwaysReadResponseBody- If set totrueChucker will read full content of response bodies even in case of parsing errors or closing the response body without reading it.
-
ChuckerInterceptor
ChuckerInterceptor(Context context, ChuckerCollector collector, Long maxContentLength, Set<String> headersToRedact)
An OkHttp Interceptor which persists and displays HTTP activity in your application for later inspection.- Parameters:
context- An Android Contextcollector- A ChuckerCollector to customize data retentionmaxContentLength- The maximum length for request and response content before their truncation.headersToRedact- a Set of headers you want to redact.
-
ChuckerInterceptor
ChuckerInterceptor(Context context, ChuckerCollector collector, Long maxContentLength)
An OkHttp Interceptor which persists and displays HTTP activity in your application for later inspection.- Parameters:
context- An Android Contextcollector- A ChuckerCollector to customize data retentionmaxContentLength- The maximum length for request and response content before their truncation.
-
ChuckerInterceptor
ChuckerInterceptor(Context context, ChuckerCollector collector)
An OkHttp Interceptor which persists and displays HTTP activity in your application for later inspection.- Parameters:
context- An Android Contextcollector- A ChuckerCollector to customize data retention
-
-
Method Detail
-
redactHeader
final Unit redactHeader(String headerName)
Adds headerName into headersToRedact
-
intercept
Response intercept(Interceptor.Chain chain)
-
-
-
-