Skip to content

Instantly share code, notes, and snippets.

@nqn
Created September 14, 2023 23:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nqn/24f33cf5846d24a07935923386eb42b8 to your computer and use it in GitHub Desktop.
Save nqn/24f33cf5846d24a07935923386eb42b8 to your computer and use it in GitHub Desktop.
gurl
$ gurl --help
Hey, gurl! πŸ’β€β™€οΈ So you wanna learn how to fetch things from the internet with some sass? You came to the right place.
Usage:
gurl [URL] [OPTIONS]
Basic Options:
-H, --header <header> Add a header, like: "Authorization: Bearer <token>" (Ugh, headers are so demanding, right?)
-X, --request <method> Specify the request method, like GET, POST, etc. (Just tell me what you want, and you'll get it!)
-d, --data <data> Send data for POST requests (Like sending a text to that boy who just won't get the hint. πŸ™„)
-o, --output <file> Save the response to a file (Because sometimes, you just gotta keep those receipts. πŸ“)
-I, --head Fetch headers only (For when you just want a quick peek. 😏)
Fun and Sassy Options:
--gossip Add a fun gossip fact to the response (Because who doesn't love a little chitchat?)
--compliment Add a sweet compliment to brighten your day (You're doing amazing, sweetie!)
--shade Throw a little shade in the response (For when you're feeling extra salty.)
SSL Options:
--insecure Proceed even if the server certificate can't be validated (I mean, live dangerously, but this isn't advised, hun.)
--cert <path> Path to a certificate file (You fancy, huh?)
Miscellaneous:
-v, --verbose Show more details about what's happening (For when you're in that extra nosy mood.)
-h, --help Show this help message, but honestly, didn't you just do that?
Examples:
1. Just a basic fetch:
$ gurl https://example.com
2. Get the tea with a header:
$ gurl -H "Authorization: Bearer supersecrettoken" https://example.com/tea
3. Spreading some gossip:
$ gurl --gossip https://example.com
4. When you're feeling shady:
$ gurl --shade https://example.com
Gurl, you got this! Now, go fetch that data like the queen you are! πŸ’…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment