gilbitron / Arrest-MySQL

A "plug-n-play" RESTful API for your MySQL database.
131 stars 219 forks source link

Still not able to get POST to work #11

Closed teknetik closed 7 years ago

teknetik commented 10 years ago

Following the previous topic on POST requests not working. I am using the RESTClient firefox plugin for testing. GET requests work fine.

I have a very simple table as below:

Field; Type; Null;
id; int(11); NO; (auto increment) username; varchar(50); YES;
numbadges; int(11); YES;

I make a POST request to my URL with the following with no additional punctuation marks:

username=test&numbadges=1

Could someone please help me understand what I should be doing here?

I also tried the following ajax request:

jQuery.ajax({ url: 'http://api.my-url.com/user', type: "POST", processData: false, data:'username=test&numbadges=1', success: function(data) { console.log(data); }, error: function(data) { console.log(data); } });

Sorry if any of this is dumb, still on a learning curve here. Any help much appreciated.