If I have a REST API that accepts request like so,
/myuri/controller/action/firstname/johnny/lastname/quest
and I have a form that via Ajax posts to the backend PHP page, how can I submit my form's information without violating REST?
If I use .serialize
for my form or use post like so,
http://api.jquery.com/jQuery.post/
$.post( "test.php", $( "#testform" ).serialize() );
or,
$.post( "test.php", { name: "John", time: "2pm" } );
isn't that keeping me from the format of my URI in the REST fashion, so my Ajax
function has the url
property looking like a REST URI?
How do I keep my URI in the REST fashion and be able to send data from a form to the backend pages?
EDIT: Are my assumptions about what a REST URI should be wrong here?