-
Notifications
You must be signed in to change notification settings - Fork 26
Cannot read property 'http' of undefined #18
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
Comments
What version are you using? |
2.0.0 |
I am having the exact same issue. js-data-http v2.0.0. Tested on io.js v3.0.0 and node 0.12.7 for good measure. |
It looks like this can be simply fixed by modifying the example code above (copied from the README) to include an options object.
Passing in undefined as the options argument is not a common use-case though because users need to specify their API's basePath. I can't see how DSHttpAdapter can do anything without this information. I think js-data-http should throw an error if the user fails to specify an object to the DSHttpAdapter constructor. It should also throw an error if the user fails to specify the basePath inside the said object. I would also modify the README to have:
|
I'll take a look when I have a development comp again. |
When I use it like
I got
The text was updated successfully, but these errors were encountered: