New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request : registering response interceptors #126
Comments
hi, i think this is a good feature but we need to be careful about both the signature and nature of the calls. For instance, it's fine if it's a synchronous interceptor but doing something that chains the response in a callback will certainly break the clients. I'd like to push this into a future release but keep the feature request open so we can work through first the ideal behavior, and next the signature for the interceptor. |
I think we should work on this when we make SwaggerHttp pluggable. |
now that SwaggerHttp is pluggable, this poses another challenge. Should the interceptor be handled in the pluggable client? Looking into this more. |
Hi
I'd like to feature request the ability to register a response interceptor, much like you can register request "interceptors" by populating window.authorizations with custom parameters.
I know this can somehow break the stateless nature of a call, given that I could reuse parts of the response to alter future requests. But it'd be the sole caller responsibility.
My use case is : I call a login service, it gives me a security token, and I have to use the token for other api requests.
I hacked swagger.js to retain the response object in localStorage, but it's ugly.
Objections ?
The text was updated successfully, but these errors were encountered: