how to fetch data from this api using 'POST' method in javascript

url—http://eign-backend.herokuapp.com/property/get-property/17/

Do i have to write complete url like till "/17/" or what!

const response=await fetch('url',{
      method:'POST',
      body: JSON.stringify(
        {
         //what should I write here
        }
      ),
      headers:{
        headers: {'Content-Type':'application/json'},
      }
    })
    const data=await response.json();
    console.log(data);
}

25 thoughts on “how to fetch data from this api using 'POST' method in javascript”

  1. 952478 783974Aw, this is an extremely good post. In thought I would like to put in location writing like this moreover – spending time and actual effort to create a good article but exactly what do I say I procrastinate alot through no indicates seem to get something accomplished. 945871

    Reply

Leave a Comment