javascript - jquery ajax call with headers -
javascript - jquery ajax call with headers -
i trying login @ tinder using ajax phone call per documentations :
https://gist.github.com/rtt/10403467
here, there table : request headers
and link login : > curl -x post https://api.gotinder.com/auth --data '{"facebook_token": fb_token, "facebook_id": fb_user_id}
'
my wish here login successsfully using method :
this have tried :-
$("#btnsend").click(function () { var dataurl = "https://api.gotinder.com/auth"; var fbtoken = "[i wrote right fb token here]"; var fbid = "[i wrote right fb id here]"; var datavalue = '{"facebook_token": "' + fbtoken + '", "facebook_id": "' + fbid + '"}'; jquery.ajax({ async: false, type: "post", beforesend: function (request) { //request.setrequestheader("x-auth-token",) request.setrequestheader("accept-language", "en;q=1, fr;q=0.9, de;q=0.8, ja;q=0.7, nl;q=0.6, it;q=0.5"); request.setrequestheader("accept", "*/*"); request.setrequestheader("useragent", "tinder/3.0.2 (iphone; ios 7.1; scale/2.00)"); request.setrequestheader("accept-encoding", "gzip, deflate"); }, headers: {"useragent": "tinder/3.0.2 (iphone; ios 7.1; scale/2.00)"}, contenttype: "application/json", datatype: "json", data: datavalue, url: dataurl, success: function (data) { console.dir(data); }, error: function (msg) { } }); });
would please help set right header in request?
$.ajaxsetup({ headers: { 'x-my-custom-header': 'some value' } }); // sends custom header $.ajax({ url: 'foo/bar' }); // overwrites default header new header $.ajax({ url: 'foo/bar', headers: { 'x-some-other-header': 'some value' } });
javascript jquery ajax
If your looking for Online Illinois license plate sticker renewals then you have need to come to the right place.We offer the fastest Illinois license plate sticker renewals in the state. tinder login failed
ReplyDelete