Download src/Shared/Infrastructure/Providers/HttpClientServiceProvider.php from pnacorp/AIKEEDO: direct link, hf CLI and curl.
- Browser
- Download file 599 Bytes
-
https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Shared/Infrastructure/Providers/HttpClientServiceProvider.php
- Command line
-
hf download hf://pnacorp/AIKEEDO/src/Shared/Infrastructure/Providers/HttpClientServiceProvider.php
-
curl -L -o HttpClientServiceProvider.php https://huggingface.co/pnacorp/AIKEEDO/resolve/main/src/Shared/Infrastructure/Providers/HttpClientServiceProvider.php
599 Bytes
| declare(strict_types=1); | |
| namespace Shared\Infrastructure\Providers; | |
| use Application; | |
| use Psr\Http\Client\ClientInterface; | |
| use Shared\Infrastructure\ServiceProviderInterface; | |
| use Symfony\Component\HttpClient\Psr18Client; | |
| class HttpClientServiceProvider implements ServiceProviderInterface | |
| { | |
| public function __construct( | |
| private Psr18Client $client | |
| ) { | |
| } | |
| /** | |
| * @inheritDoc | |
| */ | |
| public function register(Application $app): void | |
| { | |
| $app->set(ClientInterface::class, $this->client->withOptions([ | |
| 'timeout' => 600 | |
| ])); | |
| } | |
| } | |