CI and Phil Strugeons REST API |
[eluser]Unknown[/eluser]
Phil, I have been using your REST API for a few weeks now and it has worked GREAT! Thank you for publishing it! I have successfully configured multiple HTTP methods in my code (GET, POST, PUT and DELETE). I typically test with the browser (GET) and cURL (other methods). All works great for my 'first' API class, but I can't get my second class to work. Please note that my service files are in system/application/controllers/ws. Here is the code that does not work (I have the curl commented out in the code). <?php require(APPPATH.'/libraries/REST_Controller.php'); class Company extends REST_Controller { // curl -d "db_query=(company_name) values ('Simone Pringle LTD')" http://localhost:8082/ws/company/add_new_company function add_new_company_post() { log_message('debug', "************* add_new_company_post ws"); $db_query = $this->post('db_query'); $query = $this->db->query("insert into company $db_query"); $company_id=$this->db->insert_id(); $this->response( $company_id, 200 ); } } ?> Any ideas? Your help would be tremendously appreciated! Thanks, Simone |
Messages In This Thread |
CI and Phil Strugeons REST API - by El Forum - 11-15-2009, 04:48 PM
CI and Phil Strugeons REST API - by El Forum - 11-16-2009, 04:53 AM
CI and Phil Strugeons REST API - by El Forum - 11-16-2009, 06:51 AM
CI and Phil Strugeons REST API - by El Forum - 11-16-2009, 11:39 AM
CI and Phil Strugeons REST API - by El Forum - 11-17-2009, 08:44 AM
CI and Phil Strugeons REST API - by El Forum - 11-17-2009, 01:49 PM
CI and Phil Strugeons REST API - by El Forum - 11-17-2009, 05:23 PM
CI and Phil Strugeons REST API - by El Forum - 11-18-2009, 08:58 AM
CI and Phil Strugeons REST API - by El Forum - 11-18-2009, 09:24 AM
CI and Phil Strugeons REST API - by El Forum - 11-18-2009, 10:35 AM
CI and Phil Strugeons REST API - by El Forum - 11-18-2009, 10:50 AM
CI and Phil Strugeons REST API - by El Forum - 11-18-2009, 12:09 PM
CI and Phil Strugeons REST API - by El Forum - 02-04-2010, 03:28 AM
CI and Phil Strugeons REST API - by El Forum - 02-04-2010, 04:06 AM
CI and Phil Strugeons REST API - by El Forum - 02-04-2010, 04:13 AM
CI and Phil Strugeons REST API - by El Forum - 02-04-2010, 04:23 AM
CI and Phil Strugeons REST API - by El Forum - 02-05-2010, 08:28 AM
CI and Phil Strugeons REST API - by El Forum - 02-19-2010, 05:15 AM
CI and Phil Strugeons REST API - by El Forum - 02-25-2010, 04:17 AM
CI and Phil Strugeons REST API - by El Forum - 07-21-2010, 07:10 AM
|