GET REQUESTS

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
    
 * What happens after running the command is that curl sends an HTTP GET request for the 
   site's home page. An HTTP response is received containing the body, which is then printed 
   in the terminal. Because this is a terminal, instead of rendering the webpage, what 
   is seen is the text representation of the page in HTML.
    
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)

Last updated