-
Notifications
You must be signed in to change notification settings - Fork 357
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 onRequest error #107
Comments
Hey @RonSn0w, e.g.
We just added a layer on top of it to handle interceptors and what not. |
Correct @emoralesb05 . What I am saying is if I use the HttpInterceptorService as you have described it seems like the body of the header is not included in the response in the same manner that I am seeing if I simply used angular2's HttpService. |
hmm, can you specify more the response you are getting ? It is kind of weird though since we arent modifying the response at all, its just passing it through the same way we get it back from the ng2 I want to try and replicate it if possible if we can get more information about this. |
If you can post code snippets that would be awesome too. |
Hey @emoralesb05 , My colleague and I have appeared to narrow down the issue, and we believe it is due to Observable.forkJoin. e.g.
Does appear to return the proper data (sorry for misleading you with my earlier statement). However the next step in my code is to get a different source of data in the same manner, and then using the following:
I should have a json object with both objects passed along to dataObject1 and dataObject2 respectively on subscribe. Using the interceptor service I am never getting to see the "Forked separation!" log, but if I just used angular2's Http service everything works as expected. |
Awesome, ill try and replicate it and see what we can do for this specific scenario. |
Additional question. |
Yep, just tested it with and without the fix (#88) and that was the problem. |
Awesome! I started this feat on the 14th and did not notice a newer version yesterday :) While I do appreciate the fast response time, unfortunately now I can't load my site at all. While using webpack I am receiving a "Uncaught SyntaxError: Unexpected token export" on runtime which points to the index.js file of @covalent/http specifically highlighting the first line (RESTService which I am not currently using).
|
No problem! You have to configure webpack to understand how to load |
Havent heard anything. Did you test it with our latest and all? 😄 |
Sorry for the lack of response! I got distracted with other elements of our project and tabled this until we could find a resolution to the ES6 requirement. I think we were able to get the module imported and I will be testing today to make sure everything is working, but so far looks good! I'll let you know if I run into any problems and thanks again for being quick to respond! :) |
Hello everyone,
I just started using this repository and I seem to be having trouble getting a full response back on a GET operation.
As I understand by following the documentation here once you setup a custom interceptor and properly configure it in your NgModule imports, you should be able to simply replace all instances of your normal Http references with the interceptor.
However what I seem to find is under certain requests the interceptor does not seem to match the same output as the default angular Http request. My custom error interceptor at the moment is a direct copy of the example setup - simply passing along the parameters of the required methods (onRequest, onResponse, and onResponseError). Yet it appears that some of the data is not being propagated through the chain causing my page to no longer load as it was simply using the default angular2 Http module.
Interestingly I'm wondering now if this has any correlation, but the requests that seem to work fine are returning simple values (int) but the one that I know for sure fails is returning a custom json object with multiple values.
Let me know if I can clarify anything further - this library looks awesome and I would love to adopt it! Thanks!
The text was updated successfully, but these errors were encountered: