Added a simple http service returning json and setting content type and status codes if anything goes wrong