@gouseferoz take a look at Guzzle: http://docs.guzzlephp.org/en/stable/
Also, if you want a simple Guzzle wrapper, take a look at: https://github.com/kitetail/zttp
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi All,
i am trying to communicate with an external api that supports GET and POST requests and these API responses will be used inside my controller to do some more operations like saving it in DB or any such.
How can i implement this from inside a controller?
Code i was looking for is similar to this:
//This is not an actual code implementation
$api_call = HTTP("https://externalAPI.com/resource?name=feroz");
return $api_call['response'];
Can anyone point me in the right direction?
Regards, Feroz.
Please or to participate in this conversation.