From 9ead9700f8f7e7fa0eace947ada987a82f84848f Mon Sep 17 00:00:00 2001 From: Chris Guest Date: Fri, 26 Jul 2024 13:30:55 +0100 Subject: [PATCH] docs(curl): :sparkles: Example of using parallel in curl. --- 61_curl/CHEATSHEET.md | 13 +++++++++++++ 61_curl/README.md | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/61_curl/CHEATSHEET.md b/61_curl/CHEATSHEET.md index 4e6cf92..260c17e 100644 --- a/61_curl/CHEATSHEET.md +++ b/61_curl/CHEATSHEET.md @@ -23,4 +23,17 @@ curl --proto '=http' --tlsv1.3 https://www.google.com curl --proto '=http' --tlsv1.3 http://www.google.com ``` +## Parallel + +Despatch parallel requests. + +```sh +# start httpbin +docker run -it --rm -p 8080:80 kennethreitz/httpbin + +open http://127.0.0.1:8080 + +curl -vvv --parallel --parallel-immediate --parallel-max 10 http://127.0.0.1:8080/status/200 http://127.0.0.1:8080/status/200 http://127.0.0.1:8080/status/200 http://127.0.0.1:8080/headers http://127.0.0.1:8080/anything/help +``` + ## Resources diff --git a/61_curl/README.md b/61_curl/README.md index 71b135e..755888c 100644 --- a/61_curl/README.md +++ b/61_curl/README.md @@ -1,6 +1,6 @@ # README -Demonstrate some common examples with `curl` +Demonstrate some common examples with `curl` using a container - [README](#readme) - [Cheatsheet](#cheatsheet) @@ -12,6 +12,7 @@ Demonstrate some common examples with `curl` - [Retries](#retries) - [Posting](#posting) - [Follow redirects](#follow-redirects) + - [Range Requests](#range-requests) - [Resources](#resources) TODO: