framework icon indicating copy to clipboard operation
framework copied to clipboard

Common interface for Http/Fetch Client

Open MarcScheib opened this issue 8 years ago • 1 comments

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).

MarcScheib avatar Nov 25 '17 12:11 MarcScheib

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

can you close this one?

Alexander-Taran avatar May 28 '22 22:05 Alexander-Taran