Reputation: 3919
I'm trying to use CakePHP's HttpSocket class to make an API call, but I can't seem to get it to include the class. It seems pretty simple, so I can't see where I might be going wrong, but here's what I have:
At the top of the controller:
class RetailersController extends AppController {
public $uses = array(...lots of classes..., 'HttpSocket', 'Network/Http');
Then in the function itself:
$HttpSocket = new HttpSocket();
And when I run that, I get:
Fatal Error
Error: Class 'HttpSocket' not found
As I said, there's not much to this, so I can't see that there's much that can go wrong - but I seem to have managed it! What can I try next?
I'm using CakePHP 2.4.
Upvotes: 2
Views: 1255