Skip to content

Instantly share code, notes, and snippets.

@bhargav2496
Last active June 14, 2019 10:38
Show Gist options
  • Save bhargav2496/f8f75ae50040614bc5f48c5a55308d21 to your computer and use it in GitHub Desktop.
Save bhargav2496/f8f75ae50040614bc5f48c5a55308d21 to your computer and use it in GitHub Desktop.
export const addFormData = (name,email,password,confirm ) => {
return new Promise(async (resolve, rejects) => {
let data = {
name:name,
email:email,
password:password,
confirm:confirm
};
const responce = await fetch(serverUrl + "/tool/form/add/data", {
method: "post",
body: JSON.stringify(data),
headers: { "Content-Type": "application/json" }
});
const json = responce.json();
resolve({ data: true });
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment