Skip to content
This repository was archived by the owner on Apr 14, 2025. It is now read-only.

Added support for useragent header in outgoing requests#81

Merged
bhaskarkishore merged 1 commit into
mainfrom
feature/add_useragent_header_support
Jan 27, 2022
Merged

Added support for useragent header in outgoing requests#81
bhaskarkishore merged 1 commit into
mainfrom
feature/add_useragent_header_support

Conversation

@bhaskarkishore

Copy link
Copy Markdown
Contributor

Previously all HTTP requests for fetching content did not contain the user-agent header. Omitting this header can potentially cause the destination server to reject the request, thus failing the entire fetch query.

This change adds an optional config item called client_useragent. When a value is set, the header user-agent and the set value will be included in all outgoing HTTP requests.

Closes #43

@bhaskarkishore bhaskarkishore added the enhancement New feature or request label Jan 27, 2022
@bhaskarkishore bhaskarkishore self-assigned this Jan 27, 2022
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #81 (43107e5) into main (4c4d0d1) will decrease coverage by 0.06%.
The diff coverage is 33.33%.

@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
- Coverage   24.68%   24.61%   -0.07%     
==========================================
  Files          23       23              
  Lines        1495     1503       +8     
  Branches      319      321       +2     
==========================================
+ Hits          369      370       +1     
- Misses        985      992       +7     
  Partials      141      141              
Impacted Files Coverage Δ
src/config.rs 0.00% <0.00%> (ø)
src/proxy.rs 15.73% <0.00%> (-0.09%) ⬇️
src/http/hyper_client.rs 23.40% <25.00%> (-0.99%) ⬇️
src/http/mod.rs 47.70% <100.00%> (ø)

@bhaskarkishore bhaskarkishore merged commit e4b248e into main Jan 27, 2022
@bhaskarkishore bhaskarkishore deleted the feature/add_useragent_header_support branch January 27, 2022 11:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add user agent string when making client requests

3 participants