public final class ChuckInterceptor
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ChuckInterceptor.Period |
| Constructor and Description |
|---|
ChuckInterceptor(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
Response |
intercept(Chain chain) |
ChuckInterceptor |
maxContentLength(long max)
Set the maximum length for request and response content before it is truncated.
|
ChuckInterceptor |
retainDataFor(ChuckInterceptor.Period period)
Set the retention period for HTTP transaction data captured by this interceptor.
|
ChuckInterceptor |
showNotification(boolean show)
Control whether a notification is shown while HTTP activity is recorded.
|
public ChuckInterceptor(android.content.Context context)
context - The current Context.public ChuckInterceptor showNotification(boolean show)
show - true to show a notification, false to suppress it.ChuckInterceptor instance.public ChuckInterceptor maxContentLength(long max)
max - the maximum length (in bytes) for request/response content.ChuckInterceptor instance.public ChuckInterceptor retainDataFor(ChuckInterceptor.Period period)
period - the peroid for which to retain HTTP transaction data.ChuckInterceptor instance.public Response intercept(Chain chain)
throws java.io.IOException
java.io.IOException