I'm having trouble making a POST to the play framework - this may not even be Play related as much as HTTP related.
$.ajax({
type:'POST',
url:'http://localhost:9000/start',
data: {
myJson:JSON.stringify(arg)
}
}).done(function(data) {
console.log(data);
});
where arg
is an array of strings, ie:
['a', 'b', 'c']
The route I'm trying to use to capture this is:
POST /start controllers.Application.startIt(myJson)
What am I doing wrong? As of right now (if the route is capturing correctly), that function will never return a 400. There is no output to the Play console, only javascript:
POST http://localhost:9000/start 400 (Bad Request)