Skip to content

Commit

Permalink
Updated README file
Browse files Browse the repository at this point in the history
  • Loading branch information
nahime0 committed Nov 15, 2023
1 parent 623d761 commit 61e8edb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 61e8edb

Please sign in to comment.