问题
I am trying to call power bi rest api using adal.js. Token is working fine for authorization, response also coming 200 ok but no result is showing. Here is my code I am using and the url trying to access:
https://api.powerbi.com/v1.0/myorg/groups/{groupid}/reports/{reportid}
var headers = new Headers();
var bearer = "Bearer " + token;
headers.append("Authorization", bearer);
headers.append("Content-Type", "application/json");
headers.append("Accept", "None");
var options = {
method: "GET",
headers: headers
};
fetch(endPoint, options)
.then(function (response) {
d.resolve(response);
}).catch(function(err) {
d.reject(err);
});
what I am doing wrong in my code? Please suggest what should be adding in header?
回答1:
These is a known issue with this specific API. Try passing Accept null.
来源:https://stackoverflow.com/questions/53669971/200-ok-response-from-power-bi-rest-api-but-no-json