gurl detect
gurl detect
Parse a curl command from stdin or a file and save it as a named request.
Synopsis
gurl detect [--file <path>] [--name <name>] [--collection <name>]Flags
| Flag | Short | Default | Description |
|---|---|---|---|
--file | -f | stdin | Read the curl command from a file instead of stdin |
--name | -n | none | Name for the detected request |
--collection | -c | none | Assign to a collection |
Aliases
parse
Examples
Parse a curl command from stdin
echo 'curl -X POST https://api.example.com/orders -H "Content-Type: application/json" -d "{}"' \
| gurl detect --name create-orderParse a command saved in a file
gurl detect --file ./request.txt --name "my-request" --collection apiPaste from the clipboard (macOS)
pbpaste | gurl detect --name from-browserRelated commands
gurl save- Save a request from flags or--curlgurl import- Import whole collectionsgurl edit- Edit the saved request