Sha256: 71abdb677a4fb7b30d71515faf8373a569b8257af47760fd0e8fc6b24c653be9
Contents?: true
Size: 446 Bytes
Versions: 1
Compression:
Stored size: 446 Bytes
Contents
module WatsonTtsAsrClient require 'net/http' class HttpClient def self.get(uri, username = nil, password = nil) request = Net::HTTP::Get.new(uri) if !username.nil? && !password.nil? request.basic_auth(username, password) end response = Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https'){ |http| http.request(request) } response end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watson_tts_asr_client-0.1.0 | lib/EVHttp/http_client.rb |