Jump to content

HttpRequest in controller


Recommended Posts

Hi guys;



Im working on a module developement where I'm supposed to pass an array through HttpRequest  can anyone help me ? How can I run following code :


$request = new HttpRequest($url,HttpRequest::METH_POST);
                                $response= $request->send()->getBody();
                                //echo $response;
                                return $response;
                        catch (HttpException $ex)
                                //echo $ex;
                                logEvent('fatal','Exception during Request'.$request);



Array -> dataHash contains values fetched by Tools::getValue('name'), from the previous form submission in a view.

As and when I create a object forHttpRequest controller crashes and shows a blank white page.

Please help me coming up with a solution.




Link to comment
Share on other sites



As you mentioned above I enabled error reporting . Following error message was seen:


Fatal error: Class 'HttpRequest' not found in D:\xampp\htdocs\.. on line 119


And that's a PHP error because the extension which provides HttpRequest is not installed on your server

You need to install this extension


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...