Answer the question
In order to leave comments, you need to log in
Problem with Guzzle library why is it giving 500 error because of subdomain?
The code does not work, Page is not available HTTP ERROR 500
If you reduce the nested subdomain, let's say to level 3, there is no error, can it be fixed somehow?
require_once 'vendor/autoload.php';
$client = new \GuzzleHttp\Client();
//$url = 'http://companysub.dev.public.myapi.com';
$url = 'http://avtolavka.net.public.api.abcp.ru';
$res = $client->request('GET',$url);
echo $res->getStatusCode();
// 200
echo $res->getHeaderLine('content-type');
// 'application/json; charset=utf8'
echo $res->getBody();
// '{"id": 1420053, "name": "guzzle", ...}'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question