encodeJson method
Request
encodeJson(
- Request request
inherited
Implementation
Request encodeJson(Request request) {
final String? contentType = request.headers[contentTypeKey];
return (contentType?.contains(jsonHeaders) ?? false)
? request.copyWith(body: json.encode(request.body))
: request;
}