toJson method
Implementation
@override
Object toJson() {
return {
if (method.isNotDefault) 'method': method,
if (uri.isNotDefault) 'uri': uri,
if (headers.isNotDefault) 'headers': encodeList(headers),
if (body != null) 'body': encodeBytes(body),
};
}