doPatchRequest method

Future<Response> doPatchRequest(
  1. Uri uri,
  2. Map<String, dynamic> body,
  3. User? user, {
  4. required UriHelper uriHelper,
})

Send a http PATCH request to the specified uri.

The data / body of the request has to be provided as map. (key, value) The result of the request will be returned as string.

Implementation

Future<http.Response> doPatchRequest(
  final Uri uri,
  final Map<String, dynamic> body,
  final User? user, {
  required final UriHelper uriHelper,
}) async =>
    http.patch(
      uri,
      headers: _buildHeaders(
        user: user,
        uriHelper: uriHelper,
        addCredentialsToHeader: false,
      ),
      body: jsonEncode(addUserAgentParameters(body)),
    );