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

Configure HttpClient initialization to default system proxy for sending HTTP requests #82

Closed
wants to merge 1 commit into from

Conversation

dotnetian
Copy link

The code in the ServiceCollectionExtensions.cs has been updated to improve library's integration with system.

The previous behaviour for the library was ignoring the OS system-wide proxy settings, and always sending HTTP Requests directly. The code is updated so now if the OS supports this functionality and a system-wide proxy has been set, the library will also try to tunnel its HTTP requests through that.

@JKorf
Copy link
Owner

JKorf commented Dec 20, 2024

Hi, thanks for the PR; I didn't know about this functionality. Is the UseDefaultCredentials = true also necessary? The documentation specifically mentions that it doesn't affect proxy credentials.

@dotnetian
Copy link
Author

dotnetian commented Dec 25, 2024

I double-checked the official documentation, and you're right. UseDefaultCredentials can be removed as in this case it doesn't play any significant role. I see a merge conflict. Have you added this to the master branch yourself?

@JKorf
Copy link
Owner

JKorf commented Dec 25, 2024

Yes, after looking into this it seemed correct to add this. Since I was already making a new release I added the line myself.

Thanks for the PR though, let me know if you have any more improvements

@JKorf JKorf closed this Dec 25, 2024
@dotnetian
Copy link
Author

I'm happy to help. But it would be amazing if you could merge this pull request, so I could become an "official" contributor to the project. Thank you for your hard work, and keep going!

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.

2 participants