406 - Client browser does not accept the MIME type of the requested page.

3,677 views
Skip to first unread message

Cristovão Morgado

unread,
Mar 1, 2012, 3:14:38 PM3/1/12
to RestSharp
Has any1 came across this exception...

406 - Client browser does not accept the MIME type of the requested page.


On browser it´s ok ....


--
Cristovao Morgado
@TheSaintr


Ram das

unread,
Feb 8, 2016, 2:13:39 AM2/8/16
to RestSharp
Replying to a old post, but this mostly for reference for anyone who may find this through search.

Try add the response content type to enable client to process the request. Something like this (if the returned type is text/html).
request.AddHeader("Accept", "text/html");

Reference SO link.
http://stackoverflow.com/questions/16629928/restsharp-accept-header-change
Reply all
Reply to author
Forward
0 new messages