jquery - REST api authentication through json -
i'm trying simple rest api in cakephp app, using rest plugin found, authorization uses http headers.
my question is, how can supply through jquery using json, header example:
authorization: truerest username=wwwww&password=zzzzz&apikey=xxxxxyyyyyyy
$.ajax({ // ... beforesend: function(x) { x.setrequestheader('authorization', 'truerest username=wwwww&password=zzzzz&apikey=xxxxxyyyyyyy'); }, // ... });
Comments
Post a Comment