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

Passing existing config to configure function #74

Closed
micro-jumbo opened this issue Sep 27, 2016 · 3 comments
Closed

Passing existing config to configure function #74

micro-jumbo opened this issue Sep 27, 2016 · 3 comments

Comments

@micro-jumbo
Copy link
Contributor

When calling configure(function(config)) the config parameter should be passed with values currently configured

micro-jumbo added a commit to micro-jumbo/fetch-client that referenced this issue Sep 27, 2016
In configure(function(config: HttpClientConfiguration)) current configuration is passed to the function. This allows us to override existing configuration without loosing its defaults and baseUrl

Closes aurelia#74
@EisenbergEffect
Copy link
Contributor

@bryanrsmith What do you think of this?

@bryanrsmith
Copy link
Contributor

Sounds reasonable to me.

I'm actually not a fan of allowing reconfiguration at all. My favorite idea for this was actually to make the configuration immutable, and instead of allowing reconfiguration we'd have a simple way to create a new instance (child instance?) whose config was based on the first instance. It would be harder to introduce undesirable side effects when a shared client is reconfigured by one consumer.

I didn't get that idea fleshed out in time for release, though. Since we already allow reconfiguration I have no objection to this change :-)

@micro-jumbo
Copy link
Contributor Author

@EisenbergEffect @bryanrsmith
can #75 be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants