InterchangeResponse.fromJsonBody constructor

InterchangeResponse.fromJsonBody({
  1. int statusCode = defaultStatusCode,
  2. Map<String, List<String>>? headersAll,
  3. required dynamic json,
})

Construct from JSON response body

Implementation

InterchangeResponse.fromJsonBody({
  int statusCode = defaultStatusCode,
  Map<String, List<String>>? headersAll,
  required dynamic json,
}) : this.fromStringBody(
        statusCode: statusCode,
        headersAll: (headersAll ?? {})
          ..addAll({
            'Content-Type': ['application/json']
          }),
        string: jsonEncode(json),
      );