encoding property

  1. @override
Encoding get encoding
inherited

Encoding to use to encode/decode the request body.

Implementation

@override
Encoding get encoding => _encoding;
  1. @override
set encoding (Encoding? encoding)
inherited

Set the encoding to use to encode/decode the request body. Setting this will update the contentType charset parameter.

Implementation

@override
set encoding(Encoding? encoding) {
  verifyUnsent();
  if (encoding == null) throw ArgumentError.notNull('encoding');
  _encoding = encoding;
  if (!_wasContentTypeSetManually) {
    updateContentType(
        contentType!.change(parameters: {'charset': encoding.name}));
  }
}