-
Notifications
You must be signed in to change notification settings - Fork 28
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
$http.get leading to "TypeError: Cannot read property 'callback' of undefined" #27
Comments
Hi @PaddyMann! The call stack would indicate that the batch adapter is not finding the correct request for the returned response. Which version of the library are you using? Are there $resource calls going in with this request as well? If you could put a breakpoint here and just check that the request object always have a value? https://github.com/jonsamwell/angular-http-batcher/blob/master/dist/angular-http-batch.js#L501 Also you would need to set enabled false in the httpBatch config object to disable it see #13 (comment) |
@PaddyMann Also could you give me the raw http request and response I can debug it that way if all else fails :-) Also what version of angular are you using? |
Hej @jonsamwell Thanks for the speedy response, and apologies - looks like an issue at my end! I've hand-cranked the batch handling on a PHP framework and it's not working for my validation routes... Sorry for the distraction to your morning :) On an aside, I see you've adding support for node and Facebook adapters. What are the best links to read more about these specs? https://developers.facebook.com/docs/graph-api/making-multiple-requests for Facebook? Is the Facebook one gaining traction as a wider standard? :) |
Hey @PaddyMann No worries at all! Yes the node ones are gaining traction and I've had a few requests for being able to batch to facebook. I'm currently still developing that one but shouldn't be too long. The Facebook one is very much like the approach many of the batching libraries in node take. Basically creating a http post and putting all the information of each request in a json object rather than the complicated approach the http batching spec takes with multipart boundaries. Yes I use the like you reference above as the spec for the Facebook adapter. |
nice - looks much simpler :) Thanks! |
Apologies in advance if I'm doing something stupid...
Been using http-batch for a while with no issues. Most of my calls to the server go through $resource and that seems to be working fine.
I need to make a call using $http as part of a validator, and for some reason I get:
My code is as simple as it gets...:
So not sure what's causing the issue. I also had the issue in 1.6.0 before upgrading to latest this morning.
I also tried disabled httpBatcher for this call, but setting
httpBatcher.enabled = false;
before making the call had no effect.The text was updated successfully, but these errors were encountered: