node-js-libs/curlrequest

Capitalize C in curl?

Closed this issue · 5 comments

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

The curl variable is defined by you 😄

var curl = require('curlrequest');

curl.request(...);

Perhaps you're using var Curl?

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

@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?

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

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!