Skip to content

Commit

Permalink
add symfony/http-client and guzzlehttp/psr7 and `php-http/discove…
Browse files Browse the repository at this point in the history
…ry` examples usage for readme
  • Loading branch information
usarise committed Apr 6, 2024
1 parent e112a17 commit 675b703
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Inspired on [recaptcha](https://github.com/google/recaptcha)
- [Guzzle http client](#guzzle-http-client)
- [Symfony http client and Nyholm PSR-7](#symfony-http-client-and-nyholm-psr-7)
- [Symfony http client and Guzzle PSR-7](#symfony-http-client-and-guzzle-psr-7)
- [Symfony http client and Guzzle PSR-7 and Discovery](#symfony-http-client-and-guzzle-psr-7-and-discovery)
- [Curl http client and Nyholm PSR-7](#curl-http-client-and-nyholm-psr-7)
- [Discovery http client](#discovery-http-client)
- [secret key](#usage-secret-key)
Expand Down Expand Up @@ -204,6 +205,26 @@ $client = new Psr18Client(
responseFactory: new HttpFactory(),
);
```
#### Symfony http client and Guzzle PSR-7 and Discovery
##### Installation symfony http client and guzzlehttp psr7 and php http discovery
```
composer require symfony/http-client guzzlehttp/psr7 php-http/discovery
```
##### Usage
```php
use Symfony\Component\HttpClient\Psr18Client;
use Turnstile\Client\Client;

$client = new Client(
new Psr18Client(),
);
```
##### Simplified construct
```php
use Symfony\Component\HttpClient\Psr18Client;

$client = new Psr18Client();
```
#### Curl http client and Nyholm PSR-7
##### Installation nyholm psr7 and php http curl client
```
Expand Down

0 comments on commit 675b703

Please sign in to comment.