hart curl
Make a request to a workspace's dev domain with your API key
Generated from
cmd/hart at v1.5.0Sends 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|URLExamples:
hart curl /api/health
hart curl -X POST -H 'Content-Type: application/json' -d '{"a":1}' /api/items
hart curl --port 8080 -i /| Flag | Description |
|---|---|
-d, --data string | the request body; @file reads a file, @- stdin |
--fail | fail with exit status 1 and no output on an HTTP error |
-I, --head | make a HEAD request and print the status line and headers |
-H, --header stringArray | a request header, 'Name: value' (repeatable) |
-i, --include | print the status line and headers before the body |
-L, --location | follow redirects inside the workspace hosts |
--max-time duration | give up after this long (default: no limit) |
--port int | the dev port to use instead of the entry port (a path only) |
-X, --request string | the HTTP method (default GET, POST with -d) |