GuzzleHttp Hangs When Using Localhost
问题 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