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

Common interface for Http/Fetch Client #841

Open
MarcScheib opened this issue Nov 25, 2017 · 1 comment
Open

Common interface for Http/Fetch Client #841

MarcScheib opened this issue Nov 25, 2017 · 1 comment

Comments

@MarcScheib
Copy link

I'm submitting a feature request

Have you thought of introducing an interface for the Http- and Fetch-client which supports a minimal amount of methods (probably fetch() as this is the only one in fetch-client).

I am working with aurelia-api which is coupled to the Fetch-Client. I want to make this configurable based on a factory. However, somewhere, I need to call a method of the object from the factory which will be fetch().

Now, what if I want to use the Http-Client library instead of fetch? I could have used an interface in the internal methods of aurelia-api which does not rely on a specific implementation.

Making this happen probably only requires introducing one additional method to one of both libs depending on the interface (i.e. fetch() to HttpClient or request() to Fetch).

@Alexander-Taran
Copy link
Contributor

@MarcScheib looks like it never happened.
The two are different beasts I guess.

can you close this one?

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

No branches or pull requests

2 participants