lib/appengine-apis/urlfetch.rb in appengine-apis-0.0.12 vs lib/appengine-apis/urlfetch.rb in appengine-apis-0.0.13

- old
+ new

@@ -101,13 +101,15 @@ def build_urlfetch_request(url, options) # :nodoc: method = options.delete(:method) || 'GET' payload = options.delete(:payload) headers = options.delete(:headers) || {} truncate = options.delete(:allow_truncated) - follow_redirects = options.delete(:follow_redirects) || true + follow_redirects = options.delete(:follow_redirects) deadline = options.delete(:deadline) + follow_redirects = true if follow_redirects.nil? + unless options.empty? raise ArgumentError, "Unsupported options #{options.inspect}." end begin @@ -202,10 +204,14 @@ end while res.kind_of?(Net::HTTPContinue) res.reading_body(nil, req.response_body_permitted?) { yield res if block_given? } return res - end + end + + def use_ssl=(flag) + @use_ssl = flag + end end class HTTPResponse # :nodoc: alias stream_check_without_urlfetch stream_check \ No newline at end of file