Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

fetch put request js

fetch('https://reqres.in/api/users', + id {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'user'
  })
})
.then(res => {
  return res.json()
})
.then(data => console.log(data))
 
PREVIOUS NEXT
Tagged: #fetch #put #request #js
ADD COMMENT
Topic
Name
2+7 =