ExerciseDB

부분 유료
분류별 Justin | 업데이트됨 3 days ago | Health and Fitness
인기

9.9 / 10

지연 시간

363ms

서비스 수준

99%

Health Check

100%

모든 토론으로 돌아가기

The POST method cannot connect to the api

Rapid account: Movica 4 Ns 7
movica4ns7
5 months ago

router.post(’/’, async (req, res) => {
const { search } = req.body;

try {
if (search) {
const exercisesData = await fetchData (‘https://exercisedb.p.rapidapi.com/exercises’, exerciseOptions);

  const searchedExercises = exercisesData.filter(
    (exercise) => exercise.name.toLowerCase().includes(search)
           || exercise.target.toLowerCase().includes(search)
           || exercise.equipment.toLowerCase().includes(search)
           || exercise.bodyPart.toLowerCase().includes(search),
  );

  res.json(searchedExercises);
} else {
  res.json([]);

Its always return blank

Rapid account: Justin W Fns XH T 6
justin-WFnsXH_t6 Commented 5 months ago

There is no POST methods in the api. Only GET methods.

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

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