Skip to content

Commit

Permalink
readme update with config instructions (#35)
Browse files Browse the repository at this point in the history
* readme update with config instructions

Co-authored-by: marysieek <maria.korlotian@castle.io>
  • Loading branch information
Chris Concannon and marysieek committed Nov 23, 2020
1 parent 230f704 commit 8b30d83
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,24 @@ Configure the library with your Castle API secret.
Castle::setApiKey('YOUR_API_SECRET');
```

## Optional Configurations

Set preferred connection and request timeouts:
valid options for setting are:
- `CURLOPT_CONNECTTIMEOUT`
- `CURLOPT_CONNECTTIMEOUT_MS`
- `CURLOPT_TIMEOUT`
- `CURLOPT_TIMEOUT_MS`

```php
Castle::setCurlOpts($curlOpts)
```

Set a specified list of request headers to include with event context (optional, not recommended):
```php
Castle::setUseWhitelist($headers)
```

## Request context

By default, Castle extracts all the necessary information, such as IP and request
Expand Down Expand Up @@ -92,8 +110,3 @@ Whenever something unexpected happens, an exception is thrown to indicate what w

## Running test suite
Execute `vendor/bin/phpunit test` to run the full test suite





0 comments on commit 8b30d83

Please sign in to comment.