hammerspoon2-docs
    Preparing search index...

    Function post

    • post(
          url: string,
          body?: string | null,
          headers?: Record<string, string> | null,
      ): Promise<
          {
              body: string;
              headers: Record<string, string>;
              status: number;
              url: string;
          },
      >

      Perform an HTTP POST request.

      Parameters

      • url: string

        The URL to request.

      • Optionalbody: string | null

        Optional request body string.

      • Optionalheaders: Record<string, string> | null

        Optional dictionary of request headers.

      Returns Promise<
          {
              body: string;
              headers: Record<string, string>;
              status: number;
              url: string;
          },
      >

      Resolves with the HTTP response.