Permalink
Browse files

Tunnel PUT and DELETE through the _method parameter for better proxy …

…support.
  • Loading branch information...
cee-dub committed May 1, 2009
1 parent 8ed4e27 commit be9386070319636f1ee57a6cce25db77296a5736
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/cloudquery.rb
@@ -38,6 +38,10 @@ def initialize(options={})
@port = options[:port] || (@scheme == 'https' ? URI::HTTPS::DEFAULT_PORT : URI::HTTP::DEFAULT_PORT)
@path = options[:path] || PATH
@params = options[:params] || {}
if ['PUT', 'DELETE'].include?(@method)
@params['_method'] = @method
@method = 'POST'
end
@body = options[:body]
@account = options[:account]

0 comments on commit be93860

Please sign in to comment.