requestJSON method
Requests using method and path and returns a decoded JSON.
Implementation
Future<dynamic> requestJSON(
HttpMethod method,
String path, {
Map<String, String>? headers,
Credential? authorization,
Map<String, Object?>? queryParameters,
Object? body,
String? contentType,
String? accept,
}) async {
return request(
method,
path,
headers: headers,
authorization: authorization,
parameters: queryParameters,
body: body,
contentType: contentType,
accept: accept,
).then((r) => _jsonDecodeResponse(r));
}