adjusted the http(s) method. Now using the ruby net/http module