Skip to content

Instantly share code, notes, and snippets.

@kesarawimal
Last active July 1, 2022 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kesarawimal/38ebe436a03719ccfbf61dfc6cd11758 to your computer and use it in GitHub Desktop.
Save kesarawimal/38ebe436a03719ccfbf61dfc6cd11758 to your computer and use it in GitHub Desktop.
FormSubmit AJAX Documentation: jQuery
// https://api.jquery.com/jQuery.ajax
$.ajax({
method: 'POST',
url: 'https://formsubmit.co/ajax/your@email.com',
dataType: 'json',
accepts: 'application/json',
data: {
name: "FormSubmit",
message: "I'm from Devro LABS"
},
success: (data) => console.log(data),
error: (err) => console.log(err)
});
@sondt2709
Copy link

Hi, I received html format instead of json format, do you know how to fix that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment