Prayer Times

무료
분류별 meezaan | 업데이트됨 2 года назад | Tools
인기

9.8 / 10

지연 시간

75ms

서비스 수준

100%

모든 토론으로 돌아가기

API returns 400 bad request

Rapid account: Pratikraghuvanshi
pratikraghuvanshi
3 года назад

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 3 года назад

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 3 года назад

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

아래에 의견을 추가하고 토론에 참여하세요.

새 댓글을 게시하려면 로그인 / 가입