Can't run a GET request without fail #626

Closed
rjsteinert opened this Issue Aug 13, 2013 · 1 comment

Comments

Projects
None yet
2 participants

I'm running node version 0.10.12 and Request version 2.26.0, and I can't seem to get a simple GET request to run without error. Anyone have any idea what might be wrong? Am I following the docs correctly?

When I run...

request(url, function(err, res, body) {

I get...

TypeError: object is not a function
    at /root/Hive/viewController/app.js:69:3
    at callbacks (/root/Hive/viewController/node_modules/express/lib/router/index.js:161:37)
    at param (/root/Hive/viewController/node_modules/express/lib/router/index.js:135:11)
    at pass (/root/Hive/viewController/node_modules/express/lib/router/index.js:142:5)
    at Router._dispatch (/root/Hive/viewController/node_modules/express/lib/router/index.js:170:5)
    at Object.router (/root/Hive/viewController/node_modules/express/lib/router/index.js:33:10)
    at next (/root/Hive/viewController/node_modules/express/node_modules/connect/lib/proto.js:199:15)
    at Object.expressInit [as handle] (/root/Hive/viewController/node_modules/express/lib/middleware.js:31:5)
    at next (/root/Hive/viewController/node_modules/express/node_modules/connect/lib/proto.js:199:15)
    at Object.query [as handle] (/root/Hive/viewController/node_modules/express/node_modules/connect/lib/middleware/query.js:44:5)

When I run...

request.get({url:url}, function(err, res, body) { })

I get ...

TypeError: Object #<Object> has no method 'toLowerCase'
    at IncomingMessage.req.get.req.header (/root/Hive/viewController/node_modules/express/lib/request.js:48:23)
    at /root/Hive/viewController/app.js:69:11
    at callbacks (/root/Hive/viewController/node_modules/express/lib/router/index.js:161:37)
    at param (/root/Hive/viewController/node_modules/express/lib/router/index.js:135:11)
    at pass (/root/Hive/viewController/node_modules/express/lib/router/index.js:142:5)
    at Router._dispatch (/root/Hive/viewController/node_modules/express/lib/router/index.js:170:5)
    at Object.router (/root/Hive/viewController/node_modules/express/lib/router/index.js:33:10)
    at next (/root/Hive/viewController/node_modules/express/node_modules/connect/lib/proto.js:199:15)
    at Object.expressInit [as handle] (/root/Hive/viewController/node_modules/express/lib/middleware.js:31:5)
    at next (/root/Hive/viewController/node_modules/express/node_modules/connect/lib/proto.js:199:15)
Owner

mikeal commented Aug 28, 2014

Is this still an issue?

This is so old I'm closing, if it is actually still an issue just let me know and I'll re-open.

mikeal closed this Aug 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment