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

Make a GET request.

Examples

Example 1

const result = await client.get("/users/1").run();

Parameters

path: string
  • The request path, relative to baseUrl if configured.
optional
options: RequestOptions
  • Request-specific options.

Return Type

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

Usage

import { WebClient } from ".";