jsonPost.js 400 B

12345678910111213
  1. //For those shitty persons who use appplication/json instead of x-www-encoded
  2. //POST_data is constant and won't change
  3. sendJSONResp(JSON.stringify(POST_data));
  4. /*
  5. $.ajax({
  6. type: 'POST',
  7. url: '/form/',
  8. data: '{"name":"jonas"}', // or JSON.stringify ({name: 'jonas'}),
  9. success: function(data) { alert('data: ' + data); },
  10. contentType: "application/json",
  11. dataType: 'json'
  12. });
  13. */