You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system 1: Windows 10
Operating system 2: Ubuntu (16.04 or 17.04)
Execute:
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace redirtest
{
class Program
{
static void Main(string[] args)
{
var res = Task.Run(async () => await method());
res.Wait();
}
public static async Task method()
{
using (var client = new HttpClient(new HttpClientHandler
{
AllowAutoRedirect = true
}))
{
var connect = await client.GetAsync("http://www.jimber.org/redirect.php");
var requestUri = connect.RequestMessage.RequestUri.AbsoluteUri;
Console.WriteLine(requestUri);
}
}
}
}