Options
All
  • Public
  • Public/Protected
  • All
Menu

A class for sending smartly-cached web queries.

Type parameters

  • TRequestBody

  • TResponse

Hierarchy

  • WebQuery

Index

Constructors

Properties

Constructors

constructor

  • new WebQuery<TRequestBody, TResponse>(uri: string, httpMethod: HttpMethod, initialBody?: TRequestBody, headers?: {}): WebQuery<TRequestBody, TResponse>
  • Type parameters

    • TRequestBody

    • TResponse

    Parameters

    • uri: string
    • httpMethod: HttpMethod
    • Optional initialBody: TRequestBody
    • Optional headers: {}
      • [key: string]: string

    Returns WebQuery<TRequestBody, TResponse>

Properties

getResult

getResult: (forceRefetch?: boolean) => Promise<HttpResponse<TResponse>> = ...

Returns the result of the query. This function will cache the result by default if the body and URL have not changed since the last fetch.

Type declaration

    • (forceRefetch?: boolean): Promise<HttpResponse<TResponse>>
    • Returns the result of the query. This function will cache the result by default if the body and URL have not changed since the last fetch.

      Parameters

      • Optional forceRefetch: boolean

        Determines whether to recompute the query, even if the cache is valid.

      Returns Promise<HttpResponse<TResponse>>

      HttpResponse - The result of the query.

Legend

  • Property

Generated using TypeDoc