From 61e8edb2c3f8519cb98479f746722f05f347252e Mon Sep 17 00:00:00 2001 From: Vincenzo Petrucci Date: Wed, 15 Nov 2023 16:20:57 +0100 Subject: [PATCH] Updated README file --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 286dda5..1ad6922 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,14 @@ You can choose to use GET or POST requests using the `--method` option: ./vendor/bin/pest stress example.com --method=POST ``` +In addition to the `--method` option, also `--get` and `--post` shortcuts are provided: + +```bash +./vendor/bin/pest stress example.com --get +# OR +./vendor/bin/pest stress example.com --post +``` + You can choose to use a custom payload using the `--payload` option: ```bash @@ -114,10 +122,18 @@ You can choose to use GET or POST requests using the `method()` method: $result = stress('example.com')->method('POST')->for(5)->seconds(); ``` +Alternatively you can use the `get()` and `post()` shortcuts: + +```php +$result = stress('example.com')->post()->for(5)->seconds(); +``` + You can choose to use a custom payload using the `payload()` method: ```php $result = stress('example.com')->method('POST')->payload(['name' => 'Nuno'])->for(5)->seconds(); +// or +$result = stress('example.com')->post()->payload(['name' => 'Nuno'])->for(5)->seconds(); ``` At any time, you may `dd` the stress test result to see its details like if you were using the `stress` command):