javascript - GET API call working in webbrowser or postman but not jquery -
i have issue since yesterday calling api jquery code.
when call http://sub.domain.com/congresses/id via web browser (chrome , safari), works fine.
when call same route via jquery call, "get http://sub.domain.com/congresses/id net::err_failed"
i didn't log in apache access.log nor error log (i host front-end , api).
here jquery code :
$(function(){ $.ajax({ async: true, url: "http://sub.domain.com/congresses/17", datatype: "application/json", method: "get", crossdomain: true, success : function(data){ populateapp(data); }, error : function(){ populateapp(local_data); } }); addtohomescreen(); });
when run "developper server" on 3000 port, don't log when use jquery code.
i'm using apache passenger on ubuntu rails back-end , front-end runs on jquery-3.1.1
i tried use rack-cors did not change anything.
i disabled adblockplus plugin did not change either.
thanks
Comments
Post a Comment