Set Content-type based on HTTP method type

Currently the Content-type is set to "application/json" for all HTTP method types. This causes problems with some servers for GET and DELETE methods as they do not contain a request body.

This update uses the default JQuery ajax content type "application/x-www-form-urlencoded; charset=UTF-8" for GET and DELETE and "application/json; charset=utf-8" for PUT and POST.