-
public final class ChuckerInterceptor.BuilderAssembles a new ChuckerInterceptor.
-
-
Constructor Summary
Constructors Constructor Description ChuckerInterceptor.Builder(Context context)
-
Method Summary
Modifier and Type Method Description final ChuckerInterceptor.Buildercollector(ChuckerCollector collector)Sets the ChuckerCollector to customize data retention. final ChuckerInterceptor.BuildermaxContentLength(Long length)Sets the maximum length for requests and responses content before their truncation. final ChuckerInterceptor.BuilderredactHeaders(Iterable<String> headerNames)Sets headers that will be redacted if their names match. final ChuckerInterceptor.BuilderredactHeaders(String headerNames)Sets headers that will be redacted if their names match. final ChuckerInterceptor.BuilderalwaysReadResponseBody(Boolean enable)If set to trueChuckerInterceptor will read full content of response bodies even in case of parsing errors or closing the response body without reading it.final ChuckerInterceptorbuild()Creates a new ChuckerInterceptor instance with values defined in this builder. -
-
Method Detail
-
collector
final ChuckerInterceptor.Builder collector(ChuckerCollector collector)
Sets the ChuckerCollector to customize data retention.
-
maxContentLength
final ChuckerInterceptor.Builder maxContentLength(Long length)
Sets the maximum length for requests and responses content before their truncation.
Warning: setting this value too high may cause unexpected results.
-
redactHeaders
final ChuckerInterceptor.Builder redactHeaders(Iterable<String> headerNames)
Sets headers that will be redacted if their names match. They will be replaced with the
**symbols in the Chucker UI.
-
redactHeaders
final ChuckerInterceptor.Builder redactHeaders(String headerNames)
Sets headers that will be redacted if their names match. They will be replaced with the
**symbols in the Chucker UI.
-
alwaysReadResponseBody
final ChuckerInterceptor.Builder alwaysReadResponseBody(Boolean enable)
If set to
trueChuckerInterceptor will read full content of response bodies even in case of parsing errors or closing the response body without reading it.Warning: enabling this feature may potentially cause different behaviour from the production application.
-
build
final ChuckerInterceptor build()
Creates a new ChuckerInterceptor instance with values defined in this builder.
-
-
-
-