|RestSharp Redirection and Authentication 401||Scott Coates||6/18/12 7:52 PM|
RestSharp removes the trailing slash from the BaseUrl property. The server returns a 301 to a location with a trailing slash. The problem is the Authorization header is not sent on a redirect which results in a 401 exception because the server is configured for Basic Auth. I'm using the CredentialCache class now but that results in two hops per request (401 challenge and response).
|Re: RestSharp Redirection and Authentication 401||pe...@peterjohanson.com||6/18/12 8:03 PM|
One, somewhat annoying, workaround for requesting the "root resource" is
to use: new RestRequest ("/ "), the trailing whitespace will prevent
RestSharp from trimming the slash, but will be ignored by (most)
> question: http://stackoverflow.com/questions/11090454/restsharp-redi
> 1. http://stackoverflow.com/questions/11090454/restsharp-redirection-and-authentication-401