request<ResponseType> method

Future<ResponseType> request<ResponseType>(
  1. String method,
  2. String path, {
  3. Map<String, String?>? query,
  4. dynamic jsonBody,
  5. Map<String, String>? headers,
  6. JsonDeserializer<ResponseType>? responseDeserializer,
})

Performs an HTTP request of the specified method.

Implementation

Future<ResponseType> request<ResponseType>(
  String method,
  String path, {
  Map<String, String?>? query,
  dynamic jsonBody,
  Map<String, String>? headers,
  JsonDeserializer<ResponseType>? responseDeserializer,
}) async {
  query ??= const {};
  return send<ResponseType>(
    _newApiRequest(method, path, query: query, jsonBody: jsonBody),
    headers: headers,
    responseDeserializer: responseDeserializer,
  );
}