🗓️ 04102025 0030
📎 networking_connectivity
Tools for testing HTTP/HTTPS endpoints and downloading files.
curl - HTTP Testing
Commands
curl https://example.com                  # GET request
curl -I https://example.com               # Headers only (HEAD request)
curl -v https://example.com               # Verbose (debugging)
curl -X POST https://api.example.com      # POST request
curl -H "Content-Type: application/json"  # Custom headers
curl -d '{"key":"value"}' https://api.com # Send data
curl --resolve example.com:443:1.2.3.4    # Force specific IP
curl -w "%{http_code}" https://example.com # Show status code
curl -L https://example.com               # Follow redirects
curl -k https://example.com               # Ignore SSL errors (insecure!)
Use for: Testing APIs, debugging HTTP issues, checking SSL certificates, testing endpoints.
What it does: Transfer data from/to servers, supports HTTP, HTTPS, FTP, and more.
Interpreting Output
Basic GET Request
$ curl https://example.com
<!doctype html>
<html>
<head>
    <title>Example Domain</title>
...
- Shows response body (HTML, JSON, etc.)
 - Silent about errors (use 
-vfor details) 
Headers Only (-I)
$ curl -I https://example.com
HTTP/2 200
content-type: text/html; charset=UTF-8
date: Fri, 04 Oct 2025 00:30:00 GMT
server: nginx
content-length: 1256
Key headers:
- HTTP/2 200: Protocol version and status code
200- OK301/302- Redirect (use-Lto follow)404- Not Found500- Server Error403- Forbidden
 - content-type: What kind of data (HTML, JSON, etc.)
 - server: Web server software
 - date: Server's timestamp
 - content-length: Response size in bytes