I create a json that needs to be posted in jersey, a server running by grizzly that has a REST webservice gets incoming json object which need to be outputed. I\'m giving a
It is also possible to use FormData(). But you need to set contentType as false:
FormData()
contentType
false
var data = new FormData(); data.append('name', 'Bob'); function sendData() { $.ajax({ url: '/helloworld', type: 'POST', contentType: false, data: data, dataType: 'json' }); }