4
Perché HttpClient BaseAddress non funziona?
Si consideri il seguente codice, dove BaseAddressdefinisce un percorso URI parziale. using (var handler = new HttpClientHandler()) using (var client = new HttpClient(handler)) { client.BaseAddress = new Uri("http://something.com/api"); var response = await client.GetAsync("/resource/7"); } Mi aspetto che questo esegua una GETrichiesta a http://something.com/api/resource/7. Ma non lo fa. Dopo alcune ricerche, …
299
c#
.net
dotnet-httpclient