Skip to content

Commit

Permalink
Merge pull request #301 from DarronEngelbrecht/master
Browse files Browse the repository at this point in the history
feat: headers method
  • Loading branch information
owenvoke authored Dec 16, 2024
2 parents a2cad41 + 49b756c commit 9e94c5f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions stress-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,14 @@ $result = stress('example.com/articles')->put(["name" => "Nuno"]);
$result = stress('example.com/articles')->post(["name" => "Nuno"]);
```

If you want to specify request headers, you can use the provided `headers` method.

```php
$result = stress('example.com/articles')->headers([
'Authorization' => 'Bearer SecretToken',
])->get();
```

The `stress()` function return the stress test result, which you can use to set expectations. Here is the list of available methods:

<a name="the-stress-function-request-duration"></a>
Expand Down

0 comments on commit 9e94c5f

Please sign in to comment.