-
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 ChuckerInterceptor.BuilderaddBodyDecoder(BodyDecoder decoder)Adds a decoder into Chucker's processing pipeline. final ChuckerInterceptor.BuildercreateShortcut(Boolean enable)If set to true, ChuckerInterceptor will create a shortcut for your app to access list of transaction in Chucker.final ChuckerInterceptor.BuilderskipPaths(String skipPaths)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.
-
addBodyDecoder
final ChuckerInterceptor.Builder addBodyDecoder(BodyDecoder decoder)
Adds a decoder into Chucker's processing pipeline. Decoders are applied in an order they were added in. Request and response bodies are set to the first non–null value returned by any of the decoders.
-
createShortcut
final ChuckerInterceptor.Builder createShortcut(Boolean enable)
If set to
true, ChuckerInterceptor will create a shortcut for your app to access list of transaction in Chucker.
-
skipPaths
final ChuckerInterceptor.Builder skipPaths(String skipPaths)
-
build
final ChuckerInterceptor build()
Creates a new ChuckerInterceptor instance with values defined in this builder.
-
-
-
-