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

    HttpCommands provides async HTTP request handlers for GET, POST, PATCH, PUT, DELETE, and HEAD methods.

    • Integrates with the async command system for HTTP operations.
    • Supports mock responses for testing via developer utilities.
    • Uses dependency injection for fetch and developer utilities.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    developerUtils: IDeveloperUtils

    Injected developer utilities for debugging and mock responses.

    handlerMap: Record<string, string>

    Map of command handler names to method names.

    hsFetch: HsFetch

    Injected HTTP fetch utility for async operations.

    manager: IAsyncManager

    Reference to the async manager for command completion and cancellation.

    Methods

    • Parameters

      • fs: ISGROFileSystem
      • path: string

      Returns void

    • Parameters

      • fs: ISGROFileSystem
      • dirPath: string

      Returns void

    • Parameters

      • path: string

      Returns string

    • Parameters

      • event: ISGROURLEvent

      Returns string

    • Parameters

      • event: ISGROURLEvent

      Returns number

    • Invokes the post-process function from options with the response, if present. The caller is responsible for setting response.contextData (for example in execute() or the mock path) before this helper is called; this method does not modify response.contextData.

      Parameters

      Returns void

    post

    • Returns a mock response if one is configured for the request.

      Parameters

      Returns boolean

      True if a mock response was returned, false otherwise.