Module: YandexSpeechApi::Connection

Defined in:
lib/yandex_speech/connection.rb

Overview

no-doc

Defined Under Namespace

Classes: ConnectionRefused

Class Method Summary collapse

Class Method Details

.send(params) ⇒ binary data?

Sends :get request to URL


22
23
24
25
26
27
28
29
30
31
32
# File 'lib/yandex_speech/connection.rb', line 22

def send(params)
  uri = Addressable::URI.parse URL
  uri.query_values = params

  with_exception_control do
    return RestClient::Request.execute method: :get,
                                       url: uri.to_s,
                                       timeout: 10,
                                       open_timeout: 10
  end
end