Changed the way http requests are handled