working http request (not working on localhost)