'Load a json url from Webclient
I want to get data from this json url.
https://viabilita.autostrade.it/traffico-fasce-orarie-cantieri-liguria/all2.json
This data is used from this page:
https://viabilita.autostrade.it/traffico-fasce-orarie-cantieri-liguria/index.html
using (var httpClient = new HttpClient())
{
var json = await httpClient.GetStringAsync("https://viabilita.autostrade.it/traffico-fasce-orarie-cantieri-liguria/all2.json");
// Now parse with JSON.Net
}
If I try to get from webclient I get a totally different string from when I use the browser to get it.
Is perhaps the "strict-origin-when-cross-origin" that cause this? Is it some other header to add to my request?
Thank you
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
