http and https requests in node and in browser