use node-getopt for parsing curl options and cookie for parsing cookies