Closed dannyhaak closed 1 year ago
Hi @dannyhaak! Interesting use case.
Did you consider just using axios interceptors? Do you see any reason this would't work in your case?
Ah, that's an interesting option! Wasn't aware of that. Let me try that, and report back.
Yes, it seems to work perfectly fine for my use case. Case closed :).
We have a use case where we want to get events on when openapi-axios-client functions are called. The use case is that we have a platform with 'custom' JavaScript applications build by our users. Our users call openapi-axios-client functions to call our backend APIs. We want to add offline capabilities, however, we want to keep using openapi-axios-client as the 'main' frontend to our users (instead of a custom wrapper). One way of doing that would be to add events to openapi-axios-client to learn when functions are called, and when the results is obtained.
I am willing to make a PR to add this functionality - but before doing that - is this something you will merge into the main project?