hammerspoon2-docs
    Preparing search index...

    Function doRequest

    • Perform an HTTP request with any method (GET, POST, PUT, DELETE, PATCH, etc.). Use this for methods not covered by the convenience helpers, such as DELETE or PATCH.

      Parameters

      • url: string

        The URL to request.

      • method: string

        The HTTP method string (e.g. "DELETE", "PATCH", "HEAD").

      • Optionalbody: string | null

        Optional request body string.

      • Optionalheaders: Record<string, string> | null

        Optional dictionary of request headers.

      Returns Promise<any>

      Resolves with the HTTP response.