I need to query a web service say with URL www.example.com/users and get the data. Does someone knows how to do that in Symfony 2? In others, I use to do it with REST.
1 Answer
There's no in-built tools for querying web services in symfony2. Do it the way you did before (for example, using 3rd party vendor libraries or use zend framework components with symfony). Just add your library to deps, do php bin/vendors install, add a line in autoload.php:
$loader->registerPrefixes(array(
...
'Zend_' => __DIR__.'/../vendor/Zend/lib',
...
));
And query your web services in your controllers/classes via a library.