I would like to reduce the keystrokes when I use curl to test web services on my workstation.
Is there a way to set a default hostname of 'localhost:3000' into ~/.curlrc so the following will work?
curl /foo.json
|
I would like to reduce the keystrokes when I use curl to test web services on my workstation. Is there a way to set a default hostname of 'localhost:3000' into ~/.curlrc so the following will work?
| |||
|
feedback
|
|
On Unix – shell functions:
Downside: needs far more code to support options ( | |||
|
feedback
|
export h=http://example.com curl $h/foo.json Put the export statement in your ~.profile | |||
|
feedback
|