node implementation of curl