Added protected method getPostData to Controller and implemented in ItemsController
Some error handling!
Set content-type header to application/javascript