Harthelm Docs

hart curl

Make a request to a workspace's dev domain with your API key

Generated from cmd/hart at v1.5.0

Sends a request to the workspace's dev domain (workspace.urls.dev) with your API key in the Harthelm-Authorization header, which the router reads and removes: it lets you through a private dev domain. The workspace's own Authorization header is not touched.

A path (starting with /) goes to the dev domain; --port picks another dev port. A full URL is accepted only for the installation's workspace hosts and your team's verified custom domains: the key is never sent anywhere else, and redirects are followed (-L) only inside those hosts.

A small subset of curl's flags is understood. The response body goes to stdout as it is, -o has no effect.

hart curl [flags] PATH|URL

Examples:

hart curl /api/health
hart curl -X POST -H 'Content-Type: application/json' -d '{"a":1}' /api/items
hart curl --port 8080 -i /
FlagDescription
-d, --data stringthe request body; @file reads a file, @- stdin
--failfail with exit status 1 and no output on an HTTP error
-I, --headmake a HEAD request and print the status line and headers
-H, --header stringArraya request header, 'Name: value' (repeatable)
-i, --includeprint the status line and headers before the body
-L, --locationfollow redirects inside the workspace hosts
--max-time durationgive up after this long (default: no limit)
--port intthe dev port to use instead of the entry port (a path only)
-X, --request stringthe HTTP method (default GET, POST with -d)