Ruby mogilefs-client 3.12.2
[ruby-mogilefs-client.git] / lib / mogilefs / nhp_fake.rb
blob9fe9faa728e570a6e759edc6b24bc0381beee647
1 # :enddoc:
2 require 'net/http'
4 # This is just for folks that don't have net-http-persistent
5 class MogileFS::NhpFake # :nodoc:
6   attr_accessor :read_timeout, :open_timeout
8   def initialize(name)
9     @read_timeout = @open_timeout = nil
10   end
12   def request(uri, req) # :nodoc:
13     http = Net::HTTP.new(uri.host, uri.port)
14     http.read_timeout = @read_timeout
15     http.open_timeout = @open_timeout
16     http.request(req)
17   end
18 end