HTTP and HTTPS requests with caching for node.js