The problem: sending AJAX requests from an HTML5 application running on my local machine to an API hosted under IIS (Google Cloud). The Setup Client: HTML/JS app on local machine Server: API under IIS (Google Cloud) The request looked like this: $.post({ url: apiEndpoint + "Init", contentType: "application/json; charset=utf-8", data: data, success: function (response) { logResponse("API response [Init]", response.d); }, error: function (xhr, status, error) { logResponse('Fail to call init API', data); } }); The error looked like this: Originally, there was crossDomain: true in the AJAX request, but it didn’t help. There were also crossdomain.xml and clientaccesspolicy.xml on the server — also useless for this case. What I Tried (And Why It Didn’t Help) I found many client-side “solutions” for AJAX, but they did not solve the issue....
Comments
Post a Comment