node-js-libs / curlrequest

A cURL wrapper
MIT License
184 stars 44 forks source link

Capitalize C in curl? #39

Closed pixelsage closed 8 years ago

pixelsage commented 8 years ago

Currently, it only works for me if I capitalize the C in curl. It's a bit confusing on my end, because the examples all use lowercase, and no one else has reported this from what I can see. Might I have something on my end that's causing this?

Works: Curl.request(options, function(error, result){}); Error: curl.request(options, function(error, result){});

The exact error I'm getting is as follows: Exception while invoking method 'helloMethod' ReferenceError: curl is not defined

chriso commented 8 years ago

The curl variable is defined by you :smile:

var curl = require('curlrequest');

curl.request(...);

Perhaps you're using var Curl?

pixelsage commented 8 years ago

Ah, that's why – didn't define curl. Sorry, totally new to this curling business. Thanks!

pixelsage commented 8 years ago

@chriso : As per your instructions, I inserted this line into server/server.js:

var curl = require('curlrequest');

Now I'm getting the error: ReferenceError: require is not defined

Am I missing something else?

chriso commented 8 years ago

Are you running node.js? How do you run the server?

pixelsage commented 8 years ago

I'm assuming I'm running node.js? I'm testing my project locally while running meteor in the terminal. But this is sounding like it's outside of the scope of this project, so perhaps I'll take this issue to Stackoverflow! Thanks for your help thus far!