request method

Future<HttpResponse> request(
  1. HttpClient httpClient,
  2. HttpMethod method,
  3. String? path, {
  4. bool fullPath = false,
  5. Credential? authorization,
  6. Map<String, String?>? queryParameters,
  7. Object? body,
  8. String? contentType,
  9. String? accept,
  10. OnCachedResponse? onStaleResponse,
  11. Duration? staleResponseDelay,
})

Does a cached request using httpClient.

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);
}