<script>
$.ajax({
type: 'POST',
url: '/view',
data:'{"S":"Sam"}',
contentType: "application/json; charset=utf-8",
dataType: 'json',
success: function(data) { alert('data: ' + data); }
});
</script>
When this script gets loaded I get a (400 Bad request). Since the data is starightforward, I need to know if there is anyway I can directly make this request to a URL, or what would be the easiest way to map it to my Spring controller so that I can read that data from the External URL?
Thanks