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

Breaking Change: Refactor agent constructors to take proxy URI #64

Open
blowdart opened this issue Jan 8, 2025 · 0 comments
Open

Breaking Change: Refactor agent constructors to take proxy URI #64

blowdart opened this issue Jan 8, 2025 · 0 comments
Assignees
Labels
breaking change This issue introduces an API breaking change enhancement New feature or request
Milestone

Comments

@blowdart
Copy link
Owner

blowdart commented Jan 8, 2025

In order to flow proxy settings down to the OAuth helper classes it is necessary to change the agent constructors to accept the proxy settings, and other HttpClient settings, rather than take a preconfigured HttpClient.

The new constructor signature will be

protected Agent(
    Uri? proxyUri = null, 
    bool checkCertificateRevocationList = true, 
    string? httpUserAgent = null, 
    TimeSpan? timeout = null)

Previously the constructor signature was

protected Agent(HttpClient? httpClient = null)

This change also removes the utility methods for create a pre-configured HttpClient

  • public static HttpClient CreateConfiguredHttpClient(string httpUserAgent, TimeSpan? timeout = null)
  • public static HttpClient CreateConfiguredHttpClient(Uri proxyUri, TimeSpan? timeout = null)
  • public static HttpClient CreateConfiguredHttpClient(Uri proxyUri, string httpUserAgent, TimeSpan timeout)
@blowdart blowdart added enhancement New feature or request breaking change This issue introduces an API breaking change labels Jan 8, 2025
@blowdart blowdart added this to the 0.3.0 milestone Jan 8, 2025
@blowdart blowdart self-assigned this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change This issue introduces an API breaking change enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant