migrating to http.request