How to require HTTP_request in phalcon?

Hi all!

my question is,

How to require HTTP_request in phalcon?

nginx1.10.1 + PHP 7.0.14 + php-fpm7.0 + Phalcon 3.0.3

[[email protected]]$ pear7 list

Installed packages, channel


Package Version State

Archive_Tar 1.4.0 stable

Console_Getopt 1.4.1 stable

HTTP_Request 1.4.4 stable

HTTP_Request2 2.3.0 stable

Net_Socket 1.2.2 stable

Net_URL 1.0.15 stable

Net_URL2 2.2.1 stable

PEAR 1.10.1 stable

PEAR_Manpages 1.10.0 stable




My code is (Error.log pointed out line )

$req = new HttpRequest($baseURL, HttpRequest::METH_POST);

And error.log is

FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Class 'HttpRequest' not found in /usr/share/nginx/html/invo/....

Very simple , It's embarassing

Pls Help!

Sometimes when working with Namespaces and settings common PHP libraries need slash in front of them.. new \HttpRequest() etc



it is : Phalcon\Http\Request