added support for content type, json parsing