Skip to content

Commit

Permalink
Add documentation about passing ServerVariables to share() method
Browse files Browse the repository at this point in the history
  • Loading branch information
jdrieghe committed Oct 8, 2021
1 parent 28cf025 commit d28498b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ HTTP_REFERER
SERVER_NAME
```

Server variables can be passed to the `test()` method.
Server variables can be passed to the `test()` and `share()` methods.
```php
$serverVariables = ServerVariables::default()->with(
ServerVariable::SERVER_NAME,
Expand All @@ -72,4 +72,11 @@ $response = $client->test(
RewriteRule .* /foo [R]',
$serverVariables
);

$response = $client->share(
'http://localhost',
'RewriteCond %{SERVER_NAME} example.com
RewriteRule .* /foo [R]',
$serverVariables
);
```

0 comments on commit d28498b

Please sign in to comment.