responseType property

ResponseType? responseType
getter/setter pair

The type of data that Dio handles with options.

The default value is ResponseType.json. Dio will parse response string to JSON object automatically when the content-type of response is Headers.jsonContentType.

See also:

  • plain if you want to receive the data as String.
  • bytes if you want to receive the data as the complete bytes.
  • stream if you want to receive the data as streamed binary bytes.

Implementation

ResponseType? responseType;