Answer the question
In order to leave comments, you need to log in
When trying to parse XML, GuzzleHttp\Client throws a 302 redirect. How to bypass it?
When trying to parse XML, GuzzleHttp\Client throws a 302 redirect.
Like this
$res = $client->request('GET', ' https://xxxxxxxl ', ['allow_redirects' => true]);
throws another error
GuzzleHttp\Exception\TooManyRedirectsException
Will not follow more than 5 redirects
If allow_redirects' => false then just a 302 redirect and nothing is parsed.
But if you try the usual CURL, everything is fine. I will be grateful for your help!
Answer the question
In order to leave comments, you need to log in
I don't know why GuzzleHttp works the way it does. But with such an error, I only managed to parse with the usual CURl
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question