for example :
fetch('http://localhost:3000/friends', {
method: 'POST',
body: JSON.stringify({ id: 3, name: 'Camus' })
})
.then((response) => response.json())
.then((friend) => console.log(friend));
-
Notifications
You must be signed in to change notification settings - Fork 0
Camus10/http-server
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Fetching and posting data to the server.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published