A simple jQuery plugin for changing the http method (POST/PUT/DELETE) of a simple html link or button.
Look into your http debugger for see the differents http methods (all test links are sent to this page).
Link posting nothing to destination (use default options $("a.example1").restfulizer();
). The http method is specified by a data-method="POST"
into your link (you can use GET, POST, PUT, DELETE).
Link posting datas contained in the URL to destination (use default options $("a.simple").restfulizer();
). The datas are automatically parsed from the URL (disable this with the restfulizer option parse: false
).
All links with .example2
will automatically post the datas to destination. See the restfulizer method: "POST"
in the source (data-method="POST"
link attribute is be ommited).
If you want to make a button sending post datas you can specify a target parameter. See the restfulizer target: "example.html?specified=yes"
in the source