GuzzleHttp Hangs When Using Localhost
PHP Snippet 1:
$client = new \GuzzleHttp\Client([
'base_uri' => 'http://localhost:8000',
'defaults' => [
'exceptions' => false
]
]);
$response = $client->get('/api/user/1');
PHP Snippet 2:
$request = $httpClient->request('GET', 'http://localhost:8001/BlogApiV1/BlogApi/blogs/', $headers);
PHP Snippet 3:
$headers = ['headers' => ['X-API-KEY' => '123456']];