Add User-Agent header to all requests to the hub
See original GitHub issueIs there a way to add huggingface_hub
’s custom User-Agent
to all the requests to the hub? Right now, it seems to be only in files_download. See here
https://github.com/huggingface/huggingface_hub/blob/a1282ab170e6248a893764d5d6759efeaa7a5421/src/huggingface_hub/file_download.py#L317-L354
This would be useful to allow us to have more information about the client versions that use specific API endpoints (e.g: community, commit…).
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Include a User-Agent header in all requests
To create a User-Agent header, begin with the name of your application, followed by a forward slash, followed by the version of the...
Read more >add User-Agent header to http requests · Issue #2860 - GitHub
Describe the problem you are trying to solve Hi rustup developers, currently the requests sent by rustup do not include User-Agent header.
Read more >request.headers.User-Agent for Transaction table?
I noticed that on TransactionError we can get the request.headers.User-Agent value, which returns the full UserAgent information, ...
Read more >How to add User-Agent header to HttpClient in .NET
If you wish to add the User-Agent header to a single HttpRequestMessage , this can be done like this: var httpClient = new...
Read more >User-Agent Header - Tenable.io API
A standard User-Agent string helps Tenable to identify your integrations and API calls, and it assists with debugging and troubleshooting if you have...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes! To clarify things, we’re solely interested in having this line or something similar for every call to the hub:
https://github.com/huggingface/huggingface_hub/blob/a1282ab170e6248a893764d5d6759efeaa7a5421/src/huggingface_hub/file_download.py#L340
Agreed!