Sha256: 153e9e7f838caead690fb8f54011de4e862e518fb377ccb81e56748601ace899
Contents?: true
Size: 319 Bytes
Versions: 3
Compression:
Stored size: 319 Bytes
Contents
require 'net/http' require 'uri' require 'json' require 'trav3/result' module Trav3 module GET def self.call(url) response = Net::HTTP.get_response(URI(url)) if Net::HTTPOK == response.code_type Success.new(response) else RequestError.new(response) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
trav3-0.0.5 | lib/trav3/get.rb |
trav3-0.0.4 | lib/trav3/get.rb |
trav3-0.0.3 | lib/trav3/get.rb |