PersistentHandler constructor

PersistentHandler(
  1. Client client, {
  2. @Deprecated('Deprecated in favor of MessageConverter.' ' To be removed in version 6.0.0') Encoding defaultEncoding = utf8,
  3. MessageConverter? messageConverter,
})

Creates a new instance of the handler. Do not forget to call close() on the client when it's not longer needed.

Use messageConverter to fine tune the HTTP request/response conversion.

Implementation

PersistentHandler(
    Client client,
    {@Deprecated('Deprecated in favor of MessageConverter.'
        ' To be removed in version 6.0.0')
        this.defaultEncoding = utf8,
    MessageConverter? messageConverter})
    : super(client,
          messageConverter: messageConverter ??
              MessageConverter(defaultResponseEncoding: defaultEncoding));