Specified the contentType to prevent errors when clients supply their own contentTypes

- Set the content type for the different requests in the ajax functions
#947