curl 🌐

Makes requests in various protocols, including (but not limited to) HTTP/HTTPS/FTP/FTPS.

Make a simple GET request

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<H1>301 Moved</H1>
The document has moved
<A HREF="">here</A>.

Simple GET request with following redirects -L

curl -L

Write response to a file -o

curl -L -o content.html

Include response headers -i

curl -i -L
HTTP/2 301 
content-type: text/html; charset=UTF-8
date: Wed, 15 Dec 2021 17:45:16 GMT
expires: Fri, 14 Jan 2022 17:45:16 GMT
cache-control: public, max-age=2592000
server: gws
content-length: 220
x-xss-protection: 0
x-frame-options: SAMEORIGIN

Request via a HTTP proxy server -x

curl -L -x proxy-server:port

Request via a SOCKS proxy server --socks

curl -L --socks proxy-server:port

About Living in the Shell
Obsessed with doing things in the shell, I’ve decided to share my daily struggles on living in the shell as terse but informative posts.