I'm trying to parse a wikispaces page but I'm not able to get the actual page. I'm not sure if its a HttpClient bug or some missing configuration.
This is my code:
HttpClientHandler handler = new HttpClientHandler();
handler.AllowAutoRedirect = true;
_httpClient = new HttpClient(handler);
HttpResponseMessage response = await _httpClient
.GetAsync("http://medivia.wikispaces.com/Monsters");
When i run that code I get the StatusCode 302 and get sent to https://session.wikispaces.com/1/auth/auth?authToken=token. I expect the HttpClient to follow a 302 because I have AllowAutoRedirect = true
.
This is the first time I've encountered this problem. It works fine with Postman and RestClient which is part of RestSharp.