Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user-specified headers to WebClient #4

Closed
brentfraser opened this issue Mar 29, 2021 · 2 comments
Closed

Add user-specified headers to WebClient #4

brentfraser opened this issue Mar 29, 2021 · 2 comments

Comments

@brentfraser
Copy link

brentfraser commented Mar 29, 2021

Some Stac servers may require authentication. I have a Stac server that takes a username+password and returns an authorization token string. I'd like to add it to the WebClient object before a request for the catalog is made.

So in StacFactory , something like:

WebClient client = new WebClient();
client.Headers.Add("Authorization", token);
return await client.DownloadStringTaskAsync(uri)...

or some generalized method of adding Headers.

@emmanuelmathot
Copy link
Contributor

We are preparing a version to align with the release 1.0.0 of STAC. This library will be data middleware agnostic. We will remove all loaders to leave this part entirely to the developer. DotNetStac shall focus only on the STAC spec. Another library (https://github.com/Terradue/Stars), more as an SDK, will propose many helpers (with loaders) to navigate properly through the STAC documents.

@brentfraser
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants