Prayer Times

免费
通过 meezaan | 已更新 il y a 2 ans | Tools
人气

9.7 / 10

延迟

84ms

服务等级

100%

Health Check

N/A

返回所有讨论

API returns 400 bad request

Rapid account: Pratikraghuvanshi
pratikraghuvanshi
il y a 4 ans

Hi I am trying to use API to show prayer times on my website using jQuery but it return 400 bad request without even passing City or country and it returns the same on test endpoint console too when I pass country or city name.

{
“code”:400
"status":“Bad Request”
“data”:“Unable to locate city and country (even via google geocoding). It is probably invalid!”
}

Please let me know if I will need to add anything else.

Rapid account: Pratikraghuvanshi
pratikraghuvanshi Commented il y a 4 ans

I am using the below code
var settings = {
“async”: true,
“crossDomain”: true,
“url”: “https://aladhan.p.rapidapi.com/timingsByCity”,
“method”: “GET”,
“headers”: {
“x-rapidapi-host”: “aladhan.p.rapidapi.com”,
“x-rapidapi-key”: “6b54********************************3”
}
}

jQuery.ajax(settings).done(function (response) {
console.log(response);
});

Rapid account: Meezaan
meezaan Commented il y a 4 ans

Please share the actual query. Obviously no city or country is a bad request.

加入讨论 - 在下面添加评论:

登录/注册以发布新的评论