Closed teknetik closed 7 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.
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.