Node.js, Requests, Connections, ending, and closing

You close connections, you end requests.

request.end();

Works.

request.close();

Will produce a type error such as:

request Object ... has no method 'close'

Read the docs!

I know this site is a bit of a disaster zone, but if you like my writing or think you could learn something useful from me, please take a look at the book I've been writing with my coauthor Julie. There's a free sample available too!