Where to start First steps track · 15 stages
Linux Labs

HTTP — requests, responses, status codes and headers

cheat sheet · HTTP/1.1 · curl 8.5 · nginx 1.24 https://lab.dimsanych.ru/en/wiki/http/

Cheat sheet

  • curl -i http://portal.lab.test/ code, headers and body
  • curl -I http://portal.lab.test/ headers only (HEAD)
  • curl -v -o /dev/null http://portal.lab.test/ the whole exchange
  • curl -s -o /dev/null -w '%{http_code}\n' URL just the code
  • curl -H 'Host: docs.lab.test' http://127.0.0.1/ a site by name
  • curl -X POST -d 'a=1' http://portal.lab.test/f POST with a body
  • curl -L http://portal.lab.test/old follow 301 and 302
  • sudo tail /var/log/nginx/access.log which codes nginx returned
Loading…