Skip to main content
XsiSec.com
HomeReposBlogProjectsPortfolio
Š 2026 XsiSec.com
Security rules |security.txt
Updated 2026-08-15 ¡ v1.0.0+2026-08-14.82f92cb ¡ 82f92cb
← Back to overview
Security article

HTB Academy - Curl

HTB Academy - Curl: cURL, APIs, and Browser DevTools Cheatsheet --- ## 🌐 cURL Basics | Command | Description | |---------|-------------| | curl -h | Show cURL help menu | | curl {url} | Basic GET request | | curl -s -O | Download file | | curl -k | Skip HTTPS (SSL) certificate... • Tutorials • curl

2022-09-291 tag
Tags

cURL, APIs, and Browser DevTools Cheatsheet


🌐 cURL Basics

CommandDescription
curl -hShow the cURL help menu
curl {url}Send a basic GET request
curl -s -O {url}Download a file
curl -k {url}Skip HTTPS/SSL certificate validation
curl -v {url}Print full HTTP request and response details
curl -I {url}Send a HEAD request and display response headers only
curl -i {url}Display response headers and the response body
curl -A 'Mozilla/5.0' {url}Set the User-Agent header
curl -u admin:admin http://<SERVER_IP>:<PORT>/Use HTTP Basic Authentication with a username and password
curl http://admin:admin@<SERVER_IP>:<PORT>/Use HTTP Basic Authentication credentials in the URL
curl -H 'Authorization: Basic YWRtaW46YWRtaW4=' http://<SERVER_IP>:<PORT>/Set a custom authorization header
curl 'http://<SERVER_IP>:<PORT>/search.php?search=le'Send GET parameters
curl -X POST -d 'username=admin&password=admin' http://<SERVER_IP>:<PORT>/Send a POST request with form data
curl -b 'PHPSESSID=c1nsa6op7vtk7kdis7bcnbadf1' http://<SERVER_IP>:<PORT>/Send a request with cookies
curl -X POST -d '{"search":"london"}' -H 'Content-Type: application/json' http://<SERVER_IP>:<PORT>/search.phpSend a POST request with JSON data

🔗 API Usage

CommandDescription
curl http://<SERVER_IP>:<PORT>/api.php/city/londonRead a single entry
curl -s http://<SERVER_IP>:<PORT>/api.php/city/ | jqRead all entries and pretty-print the response with jq
curl -X POST http://<SERVER_IP>:<PORT>/api.php/city/ -d '{"city_name":"HTB_City","country_name":"HTB"}' -H 'Content-Type: application/json'Create an entry
curl -X PUT http://<SERVER_IP>:<PORT>/api.php/city/london -d '{"city_name":"New_HTB_City","country_name":"HTB"}' -H 'Content-Type: application/json'Update an entry
curl -X DELETE http://<SERVER_IP>:<PORT>/api.php/city/New_HTB_CityDelete an entry

🛠️ Browser DevTools

ShortcutDescription
CTRL+SHIFT+I or F12Open DevTools
CTRL+SHIFT+EOpen the Network tab
CTRL+SHIFT+KOpen the Console tab
Navigate

In this post

  1. 01cURL, APIs, and Browser DevTools Cheatsheet
  2. 02🌐 cURL Basics
  3. 03🔗 API Usage
  4. 04🛠️ Browser DevTools
Search
Explore

Popular tags

Browse all 30 tags

Comments

0 comments

No comments yet — be the first to comment.