Skip to content
Advertisement

Tag: symfony-http-client

How can I access the URL of a Symfony Http Client response?

With the Symfony Http Client I create a HTTP request like this: The output is: Now I try to output the url of that response: But the output is null. How can I get as an output the url www.something.com? Answer All the HttpClient responses implement the ResponseInterface, defined on Symfony Contracts. That interface declares a getInfo() method, as shown

Advertisement