Credentials in WmsProvider.CreateAsync #2466
-
Hi. I am not able to figure out how to pass credentials to What am I missing 😇 |
Beta Was this translation helpful? Give feedback.
Answered by
pauldendulk
Jan 29, 2024
Replies: 1 comment 2 replies
-
There is WmsProvider.Credentials, did you try that? var provider = await WmsProvider.CreateAsync(wmsUrl);
provider.Credentials = new NetworkCredential("username", "password"); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ah, I see. This is a common problem we have in our api design. The HttpClient is created deep inside. Also we do not want to offer all possible ways in which an HttpClient can be instantiated. Creating the HttpClient should be more on the surface, or on the outside.
In this case it looks like you can do you own request (in which you create your own HttpClient) by passing in the getStreamAsync function of Client.CreateAsync.