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');   },   // ... }); 

docs: http://api.jquery.com/jquery.ajax/


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -