Vereda
    Preparing search index...

    Class HttpClient

    Index
    • Send a request. With parse, data is whatever parse returns; without it, data is the body read as responseType (BodyOf), or undefined with the body left unread on raw when that's unset. When parse may or may not be set, data is T | undefined.

      Type Parameters

      • T

      Parameters

      Returns Ticket<T>

    • Send a request. With parse, data is whatever parse returns; without it, data is the body read as responseType (BodyOf), or undefined with the body left unread on raw when that's unset. When parse may or may not be set, data is T | undefined.

      Type Parameters

      Parameters

      Returns Ticket<BodyOf<R>>

    • Send a request. With parse, data is whatever parse returns; without it, data is the body read as responseType (BodyOf), or undefined with the body left unread on raw when that's unset. When parse may or may not be set, data is T | undefined.

      Type Parameters

      • T

      Parameters

      Returns Ticket<T | undefined>

    post

    • Close the client. New requests throw ConfigurationError("client closed"). When drain is true, in-flight tickets are awaited up to timeoutMs before the promise resolves, then remaining tickets are cancelled. When drain is false (default), all in-flight tickets are cancelled immediately.

      timeoutMs is required when drain is true to prevent indefinite hangs — use a value that fits your shutdown budget. It must be a finite number in (0, 2_147_483_647] (the largest delay setTimeout honours, about 24.8 days); Infinity, NaN, zero, negatives and larger values reject with ConfigurationError and leave the client open.

      Parameters

      Returns Promise<void>