If a content type is not explicitly specified with a request, an
appropriate default content type will be automatically selected. For
example, the PostJson method will set the
content type to application/json by default. This method can be used
to override that default value.
This method will validate the content type, but does not validate
the subtype. Unregistered subtypes should always be prefixed with "x-"
which designates it as experimental. Some commonly used types also use
this designation, such as text/x-vcalendar for the vCalendar format.
If your application needs to set the content type to a non-standard
value for a proprietary API, use the SetHeader method to set
the Content-Type header value. That method will not perform
any validation on the header value and will include it in the request
as-is.
The contents of the payload is not checked to ensure the
content type is valid. It is the responsibility of the application to
ensure that the correct content type is used when submitting the
request.