Difference between revisions of "CURL"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Line 20: Line 20:
 
* [[Display HTTP response headers]]:
 
* [[Display HTTP response headers]]:
 
: <code>curl -sD - -o /dev/null http://example.com</code><ref>https://stackoverflow.com/questions/3252851/how-to-display-request-headers-with-command-line-curl</ref>
 
: <code>curl -sD - -o /dev/null http://example.com</code><ref>https://stackoverflow.com/questions/3252851/how-to-display-request-headers-with-command-line-curl</ref>
:: -s  Avoid showing progress bar
+
-s  Avoid showing progress bar
:: -D  Dump headers to a file, but - sends it to stdout
+
-D  Dump headers to a file, but - sends it to stdout
:: -o /dev/null  Ignore response body
+
-o /dev/null  Ignore response body
  
 
* curl -XDELETE localhost:9200/index/type/documentID (Invoke-WebRequest -method DELETE http://localhost:9200/_all)
 
* curl -XDELETE localhost:9200/index/type/documentID (Invoke-WebRequest -method DELETE http://localhost:9200/_all)

Revision as of 13:21, 19 February 2020

cURL[1] is a command-line tool for getting or sending data including files using URL syntax. cURL supports a range of common network protocols, currently including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, TFTP, LDAP, DAP, DICT, TELNET, FILE, IMAP, POP3, SMTP and RTSP.


Basic Usage

curl --user user:pass --cookie-jar ./somefile_with_your_cookies https://xyz.com/a
curl --cookie ./omefile_with_your_cookiese https://xyz.com/b


curl -sD - -o /dev/null http://example.com[3]
-s  Avoid showing progress bar
-D  Dump headers to a file, but - sends it to stdout
-o /dev/null  Ignore response body

Advance usage



See also

  • http://man7.org/linux/man-pages/man1/curl.1.html
  • https://docs.gitlab.com/ee/api/notification_settings.html#global-notification-settings
  • https://stackoverflow.com/questions/3252851/how-to-display-request-headers-with-command-line-curl
  • Advertising: