re-factor lib/update.js to use http_request helper