Webigail
    Preparing search index...

    Class ZHttpRequestBuilder<TBody>

    Represents a builder for an http request.

    Type Parameters

    • TBody = any
    Index

    Constructors

    Properties

    json: (...args: []) => ZHttpRequestBuilder = ...

    Sets the content type to json.

    Type Declaration

    Methods

    • Sets an individual header.

      Parameters

      • key: string

        The header key to set.

      • value: string | number | boolean | null

        The value to set.

      Returns this

      This object.

    • Sets the headers.

      Parameters

      • headers: Record<string, string>

        The headers to set.

      Returns this

      This object.

    post

    • Sets the timeout for the url.

      Parameters

      • ms: number

        The total number of milliseconds to wait.

      Returns this

      The object.

    • Sets the url to make the request from.

      Parameters

      • url: string

        The url to make the request to.

      Returns this

      This object.