Skip to content
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

Interceptor should only work on String response #46

Open
janblok opened this issue Feb 13, 2017 · 0 comments
Open

Interceptor should only work on String response #46

janblok opened this issue Feb 13, 2017 · 0 comments

Comments

@janblok
Copy link

janblok commented Feb 13, 2017

When using:
$httpProvider.interceptors.push('xmlHttpInterceptor');
it tries to convert the response even when it not a xml string anymore (and fails)

Example scenario, in the application an XML is received and transformed like:
transformResponse : function(data) {
return $.parseXML(data);
}
to a dom tree, to be used for xpath expressions.
In this scenario its not required for x2js to kick in and try to convert to json, since its not an xml string anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant