aurelia / framework

The Aurelia 1 framework entry point, bringing together all the required sub-modules of Aurelia.
MIT License
11.75k stars 623 forks source link

Common interface for Http/Fetch Client #841

Open MarcScheib opened 6 years ago

MarcScheib commented 6 years ago

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 commented 2 years ago

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

can you close this one?