(also, minor tweaks to some of the descriptions)
This commit is contained in:
@@ -1,13 +1,13 @@
|
|||||||
# curl
|
# curl
|
||||||
|
|
||||||
> Transfers data from or to a server.
|
> Transfers data from or to a server.
|
||||||
> Supports most protocols including HTTP, FTP, POP3.
|
> Supports most protocols, including HTTP, FTP, and POP3.
|
||||||
|
|
||||||
- Download the contents of an URL to a file:
|
- Download the contents of an URL to a file:
|
||||||
|
|
||||||
`curl {{http://example.com}} -o {{filename}}`
|
`curl {{http://example.com}} -o {{filename}}`
|
||||||
|
|
||||||
- Download a file saving the output under the filename indicated by the URL:
|
- Download a file, saving the output under the filename indicated by the URL:
|
||||||
|
|
||||||
`curl -O {{http://example.com/filename}}`
|
`curl -O {{http://example.com/filename}}`
|
||||||
|
|
||||||
@@ -15,11 +15,11 @@
|
|||||||
|
|
||||||
`curl -O -L -C - {{http://example.com/filename}}`
|
`curl -O -L -C - {{http://example.com/filename}}`
|
||||||
|
|
||||||
- Send form-encoded data (POST request of type application/x-www-form-urlencoded):
|
- Send form-encoded data (POST request of type `application/x-www-form-urlencoded`):
|
||||||
|
|
||||||
`curl -d {{'name=bob'}} {{http://example.com/form}}`
|
`curl -d {{'name=bob'}} {{http://example.com/form}}`
|
||||||
|
|
||||||
- Send a request with an extra header using a custom HTTP method:
|
- Send a request with an extra header, using a custom HTTP method:
|
||||||
|
|
||||||
`curl -H {{'X-My-Header: 123'}} -X {{PUT}} {{http://example.com}}`
|
`curl -H {{'X-My-Header: 123'}} -X {{PUT}} {{http://example.com}}`
|
||||||
|
|
||||||
@@ -27,9 +27,9 @@
|
|||||||
|
|
||||||
`curl -d {{'{"name":"bob"}'}} -H {{'Content-Type: application/json'}} {{http://example.com/users/1234}}`
|
`curl -d {{'{"name":"bob"}'}} -H {{'Content-Type: application/json'}} {{http://example.com/users/1234}}`
|
||||||
|
|
||||||
- Pass a user name and password for server authentication and show headers info only:
|
- Pass a user name and password for server authentication:
|
||||||
|
|
||||||
`curl -u myusername:mypassword -I {{http://example.com}}`
|
`curl -u myusername:mypassword {{http://example.com}}`
|
||||||
|
|
||||||
- Pass client certificate and key for a resource, skipping certificate validation:
|
- Pass client certificate and key for a resource, skipping certificate validation:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user