lib/httpi/request.rb in httpi-2.2.7 vs lib/httpi/request.rb in httpi-2.3.0

- old
+ new

@@ -9,11 +9,11 @@ # # Represents an HTTP request and contains various methods for customizing that request. class Request # Available attribute writers. - ATTRIBUTES = [:url, :proxy, :headers, :body, :open_timeout, :read_timeout, :follow_redirect] + ATTRIBUTES = [:url, :proxy, :headers, :body, :open_timeout, :read_timeout, :follow_redirect, :query] # Accepts a Hash of +args+ to mass assign attributes and authentication credentials. def initialize(args = {}) if args.kind_of? String self.url = args @@ -80,12 +80,12 @@ # Sets the cookies from an object responding to `cookies` (e.g. `HTTPI::Response`) # or an Array of `HTTPI::Cookie` objects. def set_cookies(object_or_array) if object_or_array.respond_to?(:cookies) - cookie_store.add *object_or_array.cookies + cookie_store.add(*object_or_array.cookies) else - cookie_store.add *object_or_array + cookie_store.add(*object_or_array) end cookies = cookie_store.fetch headers["Cookie"] = cookies if cookies end