News for hackers. Stuff that matters.
Re:MirageJS: An API mocking library for frontend development by acemarke on Friday January 24, 2020 @04:19PM (#22142568)
From reading the docs and the source, it's not a proxy. It looks like it uses https://github.com/pretenderjs/pretender , which overwrites the original `XmlHttpRequest` and `fetch` functions in the browser to intercept any attempts to make AJAX requests. It then makes your attempted request with its own internal routing definitions, and returns the responses you defined.
Re:MirageJS: An API mocking library for frontend development by duxup on Friday January 24, 2020 @04:36PM (#22142712)
Ah thank you!