Use the new HTTP module from Core instead of duplicating the code here.