Search code examples
httprequestsymfony-3.4

Reliable HTTPClient For Symfony 3.4


I've spent a few hours looking for a reliable httpClient for my Symfony3.4 (php 7.2) project. I need to get data from an external API endpoint. I tried:

  • symfony/http-client (didn't work since it's created for symfony 4.3 and higher)
  • guzzle/http-client (didn't work, because I received an error that GuzzleHttp\Client service doesn't exist)
  • php-http/httplug-bundle (didn't work as well due to "Unexpected exception when instantiating class.")

Maybe someone could suggest a reliable and working library for making api requests?


Solution

  • In our Symfony 3.4 project, we use the kriswallsmith/buzz bundle to perform HTTP requests.