Using the HttpClient class with a custom url scheme in C# and WindowsForms

I would like to use the HttpClient class in my WinForms application with a custom scheme uri like

vis://justiz/X6080/6%20A%201%2f21

The custom url protocol vis has already been registered in the Windows registry.

When I try an http get with the HttpClient class (namespace System.Net.Http) I'll get an "only http or https scheme is allowed" error obvisously:

httpClient = HttpClient()
httpClient.getAsync("vis://justiz/X6080/6%20A%201%2f21")

Is there any way to make the HttpClient class work with custom url protocols?

I would like to avoid using the WebBrowser control or a simple start process.



Read more here: https://stackoverflow.com/questions/67006724/using-the-httpclient-class-with-a-custom-url-scheme-in-c-sharp-and-windowsforms

Content Attribution

This content was originally published by PeterXX at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: