Content-Length: 416828 | pFad | https://github.com/newrelic/newrelic-dotnet-agent/issues/1853

655 feat: Use HttpWebRequest instead of HttpClient on .NET Framework by tippmar-nr · Pull Request #1853 · newrelic/newrelic-dotnet-agent · GitHub
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

feat: Use HttpWebRequest instead of HttpClient on .NET Framework #1853

Merged
merged 18 commits into from
Aug 18, 2023

Conversation

tippmar-nr
Copy link
Member

@tippmar-nr tippmar-nr commented Aug 16, 2023

  • Major refactor of HttpCollectorWire to introduce an abstraction layer that allows usage of either System.Net.HttpClient (on .NET 6+) or System.Net.HttpWebRequest (on .NET Framework 4.6.2+) for sending data to the NR1 collector.
  • Adds a number of new interfaces and related implementations to make the abstraction layer more testable
  • Adds unit tests for the new code.

Resolves #1844

@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2023

Codecov Report

Merging #1853 (f00e8da) into main (6524915) will decrease coverage by 0.17%.
Report is 1 commits behind head on main.
The diff coverage is 73.26%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1853      +/-   ##
==========================================
- Coverage   83.57%   83.40%   -0.17%     
==========================================
  Files         389      402      +13     
  Lines       24504    24654     +150     
==========================================
+ Hits        20478    20563      +85     
- Misses       4026     4091      +65     
Files Changed Coverage Δ
.../DataTransport/Client/HttpContentHeadersWrapper.cs 0.00% <0.00%> (ø)
...nt/Core/DataTransport/Client/HttpContentWrapper.cs 0.00% <0.00%> (ø)
...DataTransport/Client/HttpResponseMessageWrapper.cs 0.00% <0.00%> (ø)
...t/Core/DataTransport/Client/NRHttpClientFactory.cs 0.00% <0.00%> (ø)
...ewRelic/Agent/Core/DataTransport/ConnectionInfo.cs 83.60% <ø> (ø)
...ent/Core/DataTransport/HttpCollectorWireFactory.cs 70.00% <ø> (ø)
...ent/Core/DataTransport/Client/HttpClientWrapper.cs 30.76% <30.76%> (ø)
...e/DataTransport/Client/WebRequestClientResponse.cs 65.71% <65.71%> (ø)
...ic/Agent/Core/DataTransport/Client/NRHttpClient.cs 66.66% <66.66%> (ø)
...ic/Agent/Core/DataTransport/Client/HttpResponse.cs 70.00% <70.00%> (ø)
... and 8 more

... and 2 files with indirect coverage changes

@tippmar-nr tippmar-nr changed the title **DRAFT** feat: Use HttpWebRequest instead of HttpClient on .NET Framework feat: Use HttpWebRequest instead of HttpClient on .NET Framework Aug 17, 2023
@tippmar-nr tippmar-nr marked this pull request as ready for review August 17, 2023 18:54
Copy link
Member

@chynesNR chynesNR left a comment

Choose a reason for hiding this comment

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

Looks good! Very clean

Copy link
Member

@jaffinito jaffinito left a comment

Choose a reason for hiding this comment

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

Great work!

nrcventura
nrcventura previously approved these changes Aug 17, 2023
@tippmar-nr tippmar-nr merged commit 8d6cf0f into main Aug 18, 2023
@tippmar-nr tippmar-nr deleted the feature-work/abstract-httpclient-implementation branch August 18, 2023 18:52
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

Successfully merging this pull request may close these issues.

HttpWebRequest should be used to send data to New Relic on .NET Framework
5 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/newrelic/newrelic-dotnet-agent/issues/1853

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy