marmelab / FakeRest

Patch fetch/XMLHttpRequest to fake a REST API server in the browser, based on JSON data.
MIT License
439 stars 48 forks source link

Refactor adapters #76

Closed fzaninotto closed 4 months ago

fzaninotto commented 4 months ago

Problem

To reuse the adapters with a different REST dialect, developers must rewrite everything. Also, middlewares are adapter-specific.

Solution

Use dependency injection instead of inheritance for server logic.

Rename servers to adapters

TODO