Request to http: server from my Blazor server Azure-hosted app results in a timeout.
Request to https: server works.
Requests from browser work if sent to the http resource, and fail (blocked) if sent from https.
How I understood there is a same mixed content issue in my app. How do I bypass this? Is it possible?
API server I need to send requests does not accept https.
Many thanks!
public static async Task<HttpResponseMessage> GetVersion()
{
var client = new HttpClient
{
BaseAddress = new Uri("http://webservice....")
};
var getVersion = new Version();
HttpResponseMessage response = await client.PostAsJsonAsync("", getVersion);
response.EnsureSuccessStatusCode();
return response;
}
Searching on the internet gives some perception that this is not going to be possible.
Looks like it was not the mixed content issues. Strangely sorted it by using PostAsync method instead os PostAsJsonAsync. Following works without any issues.