2 Commitit 6c4c8d9c4c ... 2d078378e5

Tekijä SHA1 Viesti Päivämäärä
  NerdRat 2d078378e5 Added some basic curl examples. 1 vuosi sitten
  NerdRat 7a7d7b8b0e Added curl useful commands. 1 vuosi sitten
1 muutettua tiedostoa jossa 31 lisäystä ja 0 poistoa
  1. 31 0
      curl.md

+ 31 - 0
curl.md

@@ -0,0 +1,31 @@
+# Curl useful commands
+
+Simplest way to `GET` data
+
+```bash
+$ curl example.com
+```
+
+Show response header
+
+```bash
+$ curl -i https://example.com
+```
+
+`GET` json and show it nicely
+
+```bash
+$ curl https://example.com/json | jq
+```
+
+`HEAD` only shows the response headers
+
+```bash
+$ curl -I https://example.com
+```
+
+Please follow redirects
+
+```bash
+$ curl -I -L https://example.com/redirected
+```