Class: YandexDetector::Net
- Inherits:
-
Object
- Object
- YandexDetector::Net
- Defined in:
- lib/yandex_detector/net.rb
Class Method Summary collapse
Class Method Details
.send_detect_request(headers) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/yandex_detector/net.rb', line 11 def send_detect_request(headers) result = nil uri = URI.parse(prepare_url(headers)) if YandexDetector::Config.timeout > 0 begin timeout YandexDetector::Config.timeout do result = ::Net::HTTP.get uri end rescue end end result end |