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

Split up IHttpSettingsContainer #773

Closed
tmenier opened this issue Nov 3, 2023 · 0 comments
Closed

Split up IHttpSettingsContainer #773

tmenier opened this issue Nov 3, 2023 · 0 comments

Comments

@tmenier
Copy link
Owner

tmenier commented Nov 3, 2023

This shouldn't affect most people but it's technically breaking since it affects a public interface.

IHttpSettingsContainer is an interface for things that have a Settings property (instance of FlurlHttpSettings) and a Headers property. It basically exists for one reason: so that a whole bunch of fluent extension methods can be defined once and apply to both IFlurlClient and IFlurlRequest. A few observations:

  • The new IFlurlClientBuilder could benefit from getting all these extension methods for free too.
  • So could HttpTest, but only for Settings - it doesn't have a Headers property.

So the changes are:

  • IHttpSettingsContainer will be broken into 2 interfaces: ISettingsContainer and IHeadersContainer (breaking).
  • IFlurlClient, IFlurlRequest, and IFlurlClientBuilder will implement both.
  • HttpTest will implement ISettingsContainer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Released
Development

No branches or pull requests

1 participant