The helper for HTTP requests to fetch a JSON with these features:

  • If the HTTP response is not 200 OK, then the execution fails with an Error including all response details.
  • The response JSON can be transformed and/or strongly validated.
  • The execution is logged and its duration measured.
  • The request is aborted on app shutdown.

Hierarchy

  • JsonFetcher

Methods

Methods

  • Type Parameters

    • TResponse

    Parameters

    Returns Promise<TResponse>

Generated using TypeDoc