Skip to content

Instantly share code, notes, and snippets.

@sslotsky sslotsky/postData.js
Created Aug 30, 2018

What would you like to do?
function postData(url, data) {
return fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json; charset=utf-8"
body: JSON.stringify(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.