ExerciseDB

免费增值
通过 Justin | 已更新 hace 18 días | Health and Fitness
人气

9.9 / 10

延迟

432ms

服务等级

88%

Health Check

100%

返回所有讨论

The POST method cannot connect to the api

Rapid account: Movica 4 Ns 7
movica4ns7
hace 6 meses

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 hace 6 meses

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

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

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