lib/cloudapp/httparty.rb in cloudapp_api-0.0.1 vs lib/cloudapp/httparty.rb in cloudapp_api-0.0.2

- old
+ new

@@ -8,6 +8,23 @@ class Response < HTTParty::BasicObject def ok? @code == 200 end end + + class Request + private + def setup_raw_request + # This is a cloudapp hack to ensure the correct headers are set on redirect from S3 + if @redirect + options[:headers] = CloudApp::HEADERS + options[:query] = {} + options[:body] = {} + end + @raw_request = http_method.new(uri.request_uri) + @raw_request.body = body if body + @raw_request.initialize_http_header(options[:headers]) + @raw_request.basic_auth(username, password) if options[:basic_auth] + setup_digest_auth if options[:digest_auth] + end + end end \ No newline at end of file