Skip to content

Commit

Permalink
feat(methods): Added information about method and payload options for…
Browse files Browse the repository at this point in the history
… the stress() function
  • Loading branch information
nahime0 committed Nov 11, 2023
1 parent 0969867 commit aec6e34
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,18 @@ In addition, the number of concurrent requests will be 1. However, you may also
$result = stress('example.com')->concurrently(requests: 2)->for(5)->seconds();
```

You can choose to use GET or POST requests using the `method()` method:

```php
$result = stress('example.com')->method('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();
```

At any time, you may `dd` the stress test result to see its details like if you were using the `stress` command):

```php
Expand Down

0 comments on commit aec6e34

Please sign in to comment.