Updated to use the HTTP library for better cross-server compatibility