Sha256: 6e3e3f7f822b39fa59b75406fcb1dc7fd9d564b66a95c04bf12a47ca07d86a39
Contents?: true
Size: 571 Bytes
Versions: 1
Compression:
Stored size: 571 Bytes
Contents
module Rastreioz class Http def http_request(request_url, use_ssl = true) @uri = URI.parse(request_url) @http = build_http(use_ssl) request = Net::HTTP::Get.new(@uri) request['Authorization'] = Rastreioz::Auth.new.token(use_ssl) http.open_timeout = Rastreioz.request_timeout http.request(request) end private def build_http(use_ssl) Net::HTTP.start(uri.host, uri.port, nil, nil, nil, nil, use_ssl: use_ssl, verify_mode: OpenSSL::SSL::VERIFY_NONE) end attr_reader :uri, :url, :http end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rastreioz-0.1.7 | lib/rastreioz/http.rb |