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!