Search code snippets, questions, articles... Chrome Extension

JQuery Ajax post request with form data

The below code can be useful to send ajax post request with form data using jQuery.
var form_data = new FormData();    
form_data.append( 'username', 'John Deo');
form_data.append('email', '');

    url: 'api_url/endpoint',
    data: fd,
    processData: false,
    contentType: false,
    type: 'POST',
    success: function(response){
Best JSON Validator, JSON Tree Viewer, JSON Beautifier at same place. Check how cool is the tool
Was this helpful?
Join Devsheet Ask a Question