refactored to use HTTP methods in ruby to set timeout.