Skip to content

Instantly share code, notes, and snippets.



Last active Feb 15, 2021
What would you like to do?
FormSubmit AJAX Documentation: Fetch
fetch("", {
method: "POST",
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
body: JSON.stringify({
name: "FormSubmit",
message: "I'm from Devro LABS"
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.log(error));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment