I'm trying to understand the difference between using a comma versus semicolon to delimited multiple content type in one string added to the restSharp request header.
Example:
request.AddHeader("Accept", acceptContentType);
with acceptContentType being the following:
application/json;odata=verbose
(this works as expected)
application/json,odata=verbose
(fails with code 400: The HTTP header field "Accept" with value "application/json,odata=verbose" could not be parsed.)
and
application/json;application/xml
(this fails with code 400. error: The HTTP header field "Accept" with value "application/json;application/xml" could not be parsed.)
application/json,application/xml
(this returns data content type as json
application/xml,application/json
(this returns data content type as xml
Is there a standard to follow or is it all dependant on the server side of how it handles the incoming header?