Sha256: 663edef94ceba3642d8b898b63243071fb101a61d2430961f1bdfa0eff47039f
Contents?: true
Size: 427 Bytes
Versions: 8
Compression:
Stored size: 427 Bytes
Contents
require 'rhet-butler/stasis' module RhetButler module Stasis class HTTPLoader def initialize require 'net/http' end def load(source_uri) response = Net::HTTP.get_response(URI(source_uri.to_s)) Document.new.tap do |doc| doc.body = response.body doc.source_uri = source_uri doc.type = response["Content-Type"] end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems