We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

How to send a GET request from Phalcon?

I'm new to Phalcon... Whats's the proper way to make a GET request from Phalcon? Is there a HTTP adapter or should I use cURL or file_get_content?


edited Mar '14

framework does not restrict you to the use of PHP, extensions or other libraries. For request any API by REST you can use Guzzle / PSR-0 compatible library. I think that it is best choice for now. https://packagist.org/packages/guzzle/guzzle

You can try httpful library too https://packagist.org/packages/nategood/httpful

edited Oct '14

file_get_content() is the simplest.

Phalcon doesn't have instruments for your task. You must use third party libs or php native functions. For example something like this https://github.com/slava-basko/MegaCurl/ it's wrapper for PHP Curl for comfortable work. I hope this will help you =)