P
Paul Wolpe
Is there a way to add a cookie with http-access2 without having a
cookie.dat? I have one cookie that I want to set for every GET I do
and I don't want to have a cookie.dat file for this one value. I have
been unable to get the following (and some similar variations) to work.
Thanks,
Paul
require 'http-access2'
client = HTTPAccess2::Client.new
cookie = WebAgent::Cookie.new
cookie.parse("fakecookiename=xxxxxxxxxxxx;", "www.foo.com")
client.cookie_manager.cookies = [cookie]
# Get the page sending the "fakecookiename" key along
puts client.get_content("http://www.foo.com/")
cookie.dat? I have one cookie that I want to set for every GET I do
and I don't want to have a cookie.dat file for this one value. I have
been unable to get the following (and some similar variations) to work.
Thanks,
Paul
require 'http-access2'
client = HTTPAccess2::Client.new
cookie = WebAgent::Cookie.new
cookie.parse("fakecookiename=xxxxxxxxxxxx;", "www.foo.com")
client.cookie_manager.cookies = [cookie]
# Get the page sending the "fakecookiename" key along
puts client.get_content("http://www.foo.com/")