CURL
BASIC WEB REQUEST
root@oco:~$ curl {targetSite:port} -v
* the -v | -vvv is used for verbose output
- it shows the full details of the HTTP request and response
root@oco:~$ curl -I {targetSite:port}
* the -I option displays the response headers
- send a HEAD request and only display the response headers
root@oco:~$ curl -i {targetSite:port}
* the -i options is used to display BOTH the headers and the response body (e.g. HTML code)DOWNLOADING
root@oco:~$ curl -s -k -O {targetSite:port}
* the -O writes output to file with the same name as the remote file
* the -s suppresses writing statuses or unneeded info in the output
* the -k is used to skip certificate checks for invalid or outdated SSL certificates
root@oco:~$ curl {targetSite:port\fileName} -o {localDestination}
* the -o specifies the output filenameMODIFICATION: USER-AGENT
BASIC HTTP AUTHENTICATION (GET)
MODIFICATION: AUTHORIZATION HEADER (GET)
MODIFICATION: AUTHENTICATION (POST)
SENDING POST REQUESTS
Last updated