tutti-api - v2.1.0
    Preparing search index...

    Class HttpClient

    Protocol-agnostic HTTP layer: applies session headers (per request, so auth set/refreshed mid-life takes effect immediately), JSON encodes bodies, and maps failures to typed errors. Shared by GraphQL, REST, and streaming.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Open a (possibly long-lived) response without buffering the body — for streaming endpoints. Caller consumes response.body.

      Parameters

      • method: string
      • path: string
      • init: RequestInit = {}

      Returns Promise<FetchResponse>

    • Send a request and parse the JSON body (or undefined if empty).

      Parameters

      • method: string
      • path: string
      • init: RequestInit = {}

      Returns Promise<unknown>