putJSON method
Future
putJSON(
- HttpClient httpClient,
- String path, {
- bool fullPath = false,
- Credential? authorization,
- Object? body,
- String? contentType,
- String? accept,
- OnCachedResponse? onStaleResponse,
- Duration? staleResponseDelay,
Does a PUT request and decodes response to JSON.
- See requestURL documentation.
Implementation
Future<dynamic> putJSON(HttpClient httpClient, String path,
{bool fullPath = false,
Credential? authorization,
Object? body,
String? contentType,
String? accept,
OnCachedResponse? onStaleResponse,
Duration? staleResponseDelay}) async {
return put(httpClient, path,
fullPath: fullPath,
authorization: authorization,
body: body,
contentType: contentType,
accept: accept,
onStaleResponse: onStaleResponse,
staleResponseDelay: staleResponseDelay)
.then((r) => r.json);
}