Member Junction
    Preparing search index...
    • Sends a GET request. Shorthand for HttpRequest with Method: 'GET'.

      Type Parameters

      • T = unknown

        the expected shape of the parsed response body.

      Parameters

      • url: string

        absolute URL, or a path when config.BaseURL is supplied.

      • Optionalconfig: Omit<HttpRequestConfig, "Url" | "Method" | "Body">

        optional per-request settings (query, headers, timeout, …).

      Returns Promise<HttpResponse<T>>

      the HttpResponse.

      on a non-2xx status, timeout, cancellation, or transport failure.

      const { Data } = await HttpGet<User[]>('https://api.example.com/users', {
      Query: { active: true },
      Headers: { Authorization: `Bearer ${token}` },
      });