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

NWS API: Adjust User-Agent header #792

Merged
merged 1 commit into from
Nov 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion wetterdienst/provider/nws/observation/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from wetterdienst.util.parameter import DatasetTreeCore

Settings.fsspec_client_kwargs["headers"] = {
"User-Agent": "wetterdienst/gutzemann@gmail.com",
"User-Agent": "wetterdienst/0.48.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Until we can use the real version number at runtime, I think it will be better than nothing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason I put my mail there is their hint
"""
Authentication
A User Agent is required to identify your application. This string can be anything, and the more unique to your application the less likely it will be affected by a security event. If you include contact information (website or email), we can contact you if your string is associated to a security event. This will be replaced with an API key in the future.
User-Agent: (myweatherapp.com, contact@myweatherapp.com)
"""

"Content-Type": "application/json",
}

Expand Down