method WebClient.prototype.patch
WebClient.prototype.patch(
path: string,
body: unknown,
options?: RequestOptions,
): Task<ResponseResult, HttpError>

Make a PATCH request with a body.

Examples

Example 1

const result = await client.patch("/users/1", { name: "Jane" }).run();

Parameters

path: string
  • The request path, relative to baseUrl if configured.
body: unknown
  • The request body (serialized as JSON).
optional
options: RequestOptions
  • Request-specific options.

Return Type

A Task that resolves with the response or rejects with an HttpError.

Usage

import { WebClient } from ".";