ExerciseDB

फ्रीमियम
द्वारा Justin | अपडेट किया गया 24 days ago | Health and Fitness
लोकप्रियता

9.9 / 10

लेटेंसी

414ms

सेवा का स्तर

86%

Health Check

100%

सभी चर्चाओं पर वापस जाएं

The POST method cannot connect to the api

Rapid account: Movica 4 Ns 7
movica4ns7
6 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 6 months ago

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

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें