Please advise on how to get JQuery request to work. I keep getting 403 Forbidden or 405 Not Allowed errors.
This is the sample code,
`var settings = {
“async”: true,
“crossDomain”: true,
“url”: “https://coronavirus-smartable.p.rapidapi.com/stats/v1/US-NC/”,
“method”: “GET”,
“headers”: {
“x-rapidapi-host”: “coronavirus-smartable.p.rapidapi.com”,
“x-rapidapi-key”: “46f46b0243msh7a994a14c64f248p1d7d65jsn11182e395fb3”
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});`
加入讨论 - 在下面添加评论:
Getting this on c# as well. Mine is specifically a 403 even with the right headers