Method: Net::HTTPExt#with_headers

Defined in:
lib/vex/base/net/http_ext.rb

#with_headers(scope, &block) ⇒ Object



84
85
86
87
88
89
90
# File 'lib/vex/base/net/http_ext.rb', line 84

def with_headers(scope, &block)
  old = headers
  self.headers = headers.dup.update scope
  yield
ensure
  self.headers = old
end