2 次代碼提交 6c4c8d9c4c ... 2d078378e5

作者 SHA1 備註 提交日期
  NerdRat 2d078378e5 Added some basic curl examples. 1 年之前
  NerdRat 7a7d7b8b0e Added curl useful commands. 1 年之前
共有 1 個文件被更改,包括 31 次插入0 次删除
  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
+```