In Sails 0.10, the default REST blueprint for a create action seems to only accept a POST with the content of the new item via query parameters. I also need to support the POSTing of a JSON body to create the item.
So, POST http://localhost:1337/user?username=George works just fine, but the following does not:
POST http://localhost:1337/user
{
username: 'George'
}
Is this possible with the default blueprint or must I implement this manually?
I was missing the header:
Content-Type: application/json
Now it works like a champ!