Differences

This shows you the differences between two versions of the page.

Link to this comparison view

linux:curl [2020/02/26 19:02] (current)
admin created
Line 1: Line 1:
 +====== curl ======
 +
 +[[https://​curl.haxx.se/​|curl]] is a tool for interacting with URLs on the command line, e.g.
 +
 +<code bash>​curl https://​curl.haxx.se/</​code>​
 +
 +returns the content of the curl website home page.
 +
 +===== Options =====
 +
 +Preceded by a hyphen, can be specified all together, e.g.
 +
 +<code bash>​curl -vdX POST https://​curl.haxx.se/</​code>​
 +
 +  ** ''​v''​ -- verbose ​
 +  ** ''​X <//​method//>''​ -- specify that request method ''<//​method//>''​ is to be used
 +  .. ''​GET''​ is the default method. ''​curl -vX GET''​ will tell you that ''​X GET''​ is unnecessary!
 +  ** ''​d''​ -- send a ''​Content-Length:​ 0''​ header
 +  .. By default this doesn'​t happen, so ''​curl -X POST''​ will return an HTTP 411 if the service doesn'​t support POST requests with an empty message body
 +
 +
 +
 +{{tag> curl}}
 +~~DISCUSSION~~
 +