Documentation
    Preparing search index...
    • Fetch function only for HEAD method.

      Parameters

      • connection: IConnection

        Connection information for the remote HTTP server

      • route: IFetchRoute<"HEAD">

        Route information about the target API

      Returns Promise<void>

      Nothing because of HEAD method

      contracts/common.md#principled-implementation The overloads narrow arguments by method; the implementation refuses encryption metadata and delegates to FetcherBase.request. Failed statuses become HttpError with their original text, successful HEAD has no data, and binary successes transfer response.body unchanged or create a synchronously closed empty stream if absent. Stream consumption and cancellation belong to the caller.

      contracts/common.md#clear-and-simple-design One guard and one delegation, with the overloads only splitting the types.

      contracts/common.md#prohibited-implementation-shortcuts The guard follows the route metadata, not a path or a connection.

      contracts/common.md#meaningful-documentation Each overload documents its parameters and return value.

    • Fetch function only for GET method.

      Type Parameters

      • Output

      Parameters

      • connection: IConnection

        Connection information for the remote HTTP server

      • route: IFetchRoute<"GET">

        Route information about the target API

      Returns Promise<Output>

      Response body data from the remote API

    • Fetch function for the POST, PUT, PATCH and DELETE methods.

      Type Parameters

      • Input
      • Output

      Parameters

      • connection: IConnection

        Connection information for the remote HTTP server

      • route: IFetchRoute<"POST" | "PUT" | "PATCH" | "DELETE">

        Route information about the target API

      • Optionalinput: Input
      • Optionalstringify: (input: Input) => string

      Returns Promise<Output>

      Response body data from the remote API