cancel
Showing results for 
Search instead for 
Did you mean: 

Cors in MTA sap

0 Kudos
298

When using cors-anywhere the browser showing the error 403 on clicking that by inspecting it showing the page saying request for demo server. How to rectify this error.

I'm using ajax request to get data from odata service.

onInit: function () {

// debugger; this.oModel=new JSONModel();

var that = this; $.ajax({ type: "GET", crossDomain: false, headers : { "X-Requested-With": "XMLHttpRequest" },

// url: "https://7gx0-demo-demo-node.cfapps.us10.hana.ondemand.com/data/xsjs/demo.xsjs",

url: " https://cors-anywhere.herokuapp.com/https://holrl-demo-demo-node.cfapps.us10.hana.ondemand.com/data/..., dataType:"json"

} ).done(function(pdata){

that.oModel.setData(pdata); //console.log(pdata.results); // oModel.setData(arr); that.getView().setModel(that.oModel); });

This the error, I'm getting in chrome.

403 Forbidden

<form><p>This demo of CORS Anywhere should only be used for development purposes, see <a href="https://github.com/Rob--W/cors-anywhere/issues/301">https://github.com/Rob--W/cors-anywhere/issues/301</a>.<p>To temporarily unlock access to the demo, click on the following button: <input type="submit" value="Request temporary access to the demo server"><input type="hidden" name="accessRequest" value="c720ee5818c431245096"></form>

On clicking request temporary access, it is working correctly. But, I don't want to click again and again request demo.

Accepted Solutions (0)

Answers (0)