request method
Future<HttpResponse>
request(
- HttpClient httpClient,
- HttpMethod method,
- String? path, {
- bool fullPath = false,
- Credential? authorization,
- Map<
String, String?> ? queryParameters, - Object? body,
- String? contentType,
- String? accept,
- OnCachedResponse? onStaleResponse,
- Duration? staleResponseDelay,
Does a cached request using httpClient
.
- See requestURL documentation.
Implementation
Future<HttpResponse> request(
HttpClient httpClient, HttpMethod method, String? path,
{bool fullPath = false,
Credential? authorization,
Map<String, String?>? queryParameters,
Object? body,
String? contentType,
String? accept,
OnCachedResponse? onStaleResponse,
Duration? staleResponseDelay}) async {
var requestURL = httpClient.buildMethodRequestURL(
method, path, fullPath, queryParameters);
return this.requestURL(httpClient, method, requestURL,
authorization: authorization,
queryParameters: queryParameters,
body: body,
contentType: contentType,
accept: accept,
onStaleResponse: onStaleResponse,
staleResponseDelay: staleResponseDelay);
}