Here is a simple code snipplet but this just hangs and unresponsive.
$httpClient = new GuzzleHttp\Client(); // version 6.x
$headers = ['X-API-KEY' => '123456'];
$request = $httpClient->request('GET', 'http://localhost:8000/BlogApiV1/BlogApi/blogs/', $headers);
$response = $client->send($request, ['timeout' => 2]);
echo $request->getStatusCode();
echo $request->getHeader('content-type');
echo $request->getBody();
die();
Any pointers much appreciated. When I tried above with the github api using my username and password, I do get a 200 response and a lot of info.
http://localhost:8000/BlogApiV1/BlogApi/blogs/
in your browser? – Adenovirushttp://localhost:8000/BlogApiV1/BlogApi/blogs
not the snippet above. – Adenovirus