From 8d70685f0ba73aece077a2b4cf0e59a04a37d8e7 Mon Sep 17 00:00:00 2001 From: Nir Elbaz Date: Wed, 29 Jan 2020 13:53:07 +0200 Subject: [PATCH] ab: add POST request example (#3805) * Update ab.md Sending POST requests * Update pages/common/ab.md Co-Authored-By: Marco Bonelli Co-authored-by: Marco Bonelli --- pages/common/ab.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/common/ab.md b/pages/common/ab.md index 64492f7ae..2770db665 100644 --- a/pages/common/ab.md +++ b/pages/common/ab.md @@ -3,7 +3,7 @@ > Apache Benchmarking tool. The simplest tool to perform a load testing. > More information: . -- Execute 100 HTTP GET requests to given URL: +- Execute 100 HTTP GET requests to a given URL: `ab -n {{100}} {{url}}` @@ -18,3 +18,7 @@ - Set the maximum number of seconds to spend for benchmarking: `ab -t {{60}} {{url}}` + +- Execute 100 HTTP POST requests to a given URL, using a JSON payload from a file: + +`ab -n {{100}} -T {{application/json}} -p {{data.json}} {{url}}`