patch method

  1. @override
Future<Response> patch({
  1. dynamic body,
  2. Map<String, String>? headers,
  3. Uri? uri,
})
inherited

Send a PATCH request.

If uri is given, the request will be sent to that exact uri. If uri is null, the uri on the BaseRequest will be used (and is thus required).

If headers are given, they will be merged with the set of headers already defined on the BaseRequest.

If body is given, it must be of valid type for the type of request being sent. For example, if sending a JSON request using the JsonRequest, body must be a JSON-encodable Map or List.

Implementation

@override
Future<Response> patch(
    {dynamic body, Map<String, String>? headers, Uri? uri}) async {
  final response =
      await _send('PATCH', body: body, headers: headers, uri: uri);
  assert(response is Response, 'patch() should return a Response');
  return response as Response;
}