Created
December 7, 2021 06:09
-
-
Save NaClYen/94bcfbc54246c580a090f7158671b2df to your computer and use it in GitHub Desktop.
fetch post json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fetch('http://localhost:8888/test', { | |
method: 'POST', | |
body: JSON.stringify({ name: 'NaCl' }), | |
headers: { | |
'content-type': 'application/json' | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment