@seamapi/http - v1.70.0
    Preparing search index...

    Class SeamHttpRequest<TResponse, TResponseKey>

    Type Parameters

    • const TResponse
    • const TResponseKey extends keyof TResponse | undefined

    Implements

    Index

    Constructors

    Properties

    "[toStringTag]": string = 'SeamHttpRequest'

    Accessors

    • get body(): unknown

      Returns unknown

    • get method(): Method

      Returns Method

    • get params(): undefined | Record<string, unknown>

      Returns undefined | Record<string, unknown>

    • get pathname(): string

      Returns string

    • get url(): URL

      Returns URL

    Methods

    • Attaches a callback for only the rejection of the Promise.

      Type Parameters

      • TResult = never

      Parameters

      • Optionalonrejected: null | ((reason: unknown) => TResult | PromiseLike<TResult>)

        The callback to execute when the Promise is rejected.

      Returns Promise<
          | TResult
          | (
              TResponseKey extends keyof TResponse
                  ? TResponse[TResponseKey<TResponseKey>]
                  : undefined
          ),
      >

      A Promise for the completion of the callback.

    • Returns Promise<TResponse>

    • Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.

      Parameters

      • Optionalonfinally: null | (() => void)

        The callback to execute when the Promise is settled (fulfilled or rejected).

      Returns Promise<
          TResponseKey extends keyof TResponse
              ? TResponse[TResponseKey<TResponseKey>]
              : undefined,
      >

      A Promise for the completion of the callback.