jquery - Ajax get request returns Content-Type "text/javascript; charset=utf-8" cannot process -
i making following request:
$.ajax({ url: url, method: "get", datatype: "jsonp", scriptcharset: 'utf-8', success: function (response) { alert("success: " + response); }, fail: function (response) { alert("fail: " + response); }, done: function(response) { alert("fail: " + response); }, });
the url looks like:
https://www.somedomain.com/blah-150/lc-add.js?[form]email=secret@mail.com&[form]name=billleblanc&[form]postcode=e3n3p1&[form]emailstatus=verified&callback=?
when request made can see in network tab of firefox successful , response (tab in ff) request looks like:
("success", "added", {"form_data":{"email":"secret@mail.com","name":"billleblanc","postcode":"e3n3p1","emailstatus":"verified"},"key":"blah-150","location":{"time_zone":null,"country_name":"canada","country_code":"ca","city_name":"mississauga","region_name":"on","description":"mississauga, on, canada"},"language_code":"en"});
the problem unable actual response in ajax call , none of callbacks fired. response sitting there. know problem has response contenttype no combination of things i've done give me access it. also, without datatype:"jsonp" no response visible in network tab of ff
Comments
Post a Comment