skip to Main Content

Reactjs – Using Fetch in REACT for PUT/PATCH doesn't work for me

Hello in my React App I use this specific comportement to handle modification (status change actived/deactived) const handleActifEspece = (index, statutActif) => { let especeAActiver = especes.find(espece => espece.id === index) especeAActiver.actif = statutActif console.log(JSON.stringify(especeAActiver)) fetch(`http://localhost:8000/api/especes/${index}`, { method: 'PUT', headers:…

VIEW QUESTION

Convert content to text parsing JSON URL response

I've got a url where the result is shown as below "playerInfo": { "059gh": { "eligiblePos": "Flx3,G,Flx,Flx2,PG", "status": "FA" }, "04mr6": { "eligiblePos": "Flx3,G,Flx,Flx2,PG", "status": "FA" }, "059fz": { "eligiblePos": "Flx3,G,Flx,Flx2,PG", "status": "FA" }, "059fw": { "eligiblePos": "Flx3,G,Flx,Flx2,PG", "status": "FA"…

VIEW QUESTION
Back To Top
Search