Skip to content
Snippets Groups Projects
Commit b645d74b authored by Jiří Kalvoda's avatar Jiří Kalvoda
Browse files

Module: Http: allow redirects

parent 5d96f05f
No related branches found
No related tags found
No related merge requests found
......@@ -365,7 +365,11 @@ text = ERR
{
if(client != null)
client.Dispose();
client = new HttpClient();
var handler = new HttpClientHandler()
{
AllowAutoRedirect = false
};
client = new HttpClient(handler);
client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36");
client.Timeout = TimeSpan.FromMilliseconds(10000);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment