nisargPresta Posted April 14, 2015 Share Posted April 14, 2015 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); $request->addPostFields($dataHash); try { $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. Regards -Nisarg Link to comment Share on other sites More sharing options...
Tuni-Soft Posted April 14, 2015 Share Posted April 14, 2015 You need to enable error reporting because a blank page is not helpful Start by enabling debugging mode in defines.inc.php Link to comment Share on other sites More sharing options...
nisargPresta Posted April 14, 2015 Author Share Posted April 14, 2015 Hi; 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 Link to comment Share on other sites More sharing options...
Tuni-Soft Posted April 14, 2015 Share Posted April 14, 2015 Hi; 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 http://us.php.net/manual/en/book.http.php Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now