patchJson method

Future<TestResponse> patchJson(
  1. String path,
  2. Object body, {
  3. String? token,
  4. Map<String, String>? headers,
})

Sends a PATCH request with JSON body and optional auth.

Implementation

Future<TestResponse> patchJson(
  String path,
  Object body, {
  String? token,
  Map<String, String>? headers,
}) => patch(
  path,
  body: body,
  headers: RequestHelper.mergeHeaders(
    RequestHelper.jsonHeaders,
    token != null ? AuthHelper.bearer(token) : {},
    headers ?? {},
  ),
);