Hi there,
I’m trying to get every realm by requesting the wow’s API.
My code :
public function getRealms()
{
$response = $this->client->request(
'GET',
'https://eu.api.blizzard.com/data/wow/realm/index',
[
'auth_bearer' => $this->auth_bearer,
'headers' => [
'Cache-Control' => 'no-cache',
'Connection' => 'keep-alive'
],
'query' => [
'namespace' => 'dynamic-eu',
'locale' => 'en_EN'
]
]
);
$statusCode = $response->getStatusCode();
dump($statusCode); // show "200"
$contentType = $response->getHeaders()['content-type'][0];
dump($contentType); // show "application/json;charset=UTF-8"
$contentArray = $response->toArray(); // <== TIMEOUT ERROR
dump($contentArray);
return $contentArray;
}
And after default timeout I get this error
Idle timeout reached for “https:// eu.api.blizzard .com/data/wow/realm/index?namespace=dynamic-eu&locale=en_EN”.
I do not understand why I’m getting this error while I’m getting a 200 success code. I’m using HttpClient which is embedded with Symfony framework. And my function is on a service class.
Any ideas ?
EDIT : I’m testing every request with Postman. And it works on Postman. And I tested with more items on another API (500+ items), this function works fine.