Hosanna UI API v1.30.2-next
    Preparing search index...

    HsFetch is a custom implementation of an HTTP client for managing asynchronous requests. It supports features like cancellation tokens, custom headers, and response normalization.

    Index

    Constructors

    Properties

    activeRequests: Map<number, IActiveRequest> = ...

    A map of active requests, keyed by their unique identifiers.

    defaultHeaders: Record<string, string> = ...

    Default headers to include in all requests.

    Methods

    • Creates an IHsFetchResponse object from the given event and transfer.

      Parameters

      • event: ISGROURLEvent

        The URL event containing the response data.

      • transfer: ISGROUrlTransfer

        The URL transfer object.

      • forceText: boolean = false

      Returns IHsFetchResponse

      The normalized fetch response.

    • Logs detailed failure information for service call failures.

      Parameters

      • url: string

        The URL that was requested.

      • options: HsFetchOptions

        The request options that were used.

      • Optionalevent: ISGROURLEvent

        The URL event (if available) containing response details.

      • Optionalerror: Error

        The error that occurred (if available).

      Returns void

    • Normalizes response headers by converting all keys to lowercase.

      Parameters

      • headers: Record<string, string>

        The response headers.

      Returns Record<string, string>

      The normalized headers.