FSInterceptor constructor

FSInterceptor({
  1. int computeRequestSize(
    1. RequestOptions
    ) = requestContentLength,
  2. int computeResponseSize(
    1. Response?
    ) = responseContentLength,
})

Creates a FSInterceptor that captures network events.

The computeRequestSize and computeResponseSize functions are used to compute the size of the request and response data. By default, they assime UTF-8 encoding. If your request uses another enocoding, override these fields.

Implementation

FSInterceptor({
  this.computeRequestSize = requestContentLength,
  this.computeResponseSize = responseContentLength,
});