From: Konrad Meyer Date: 2007-11-06T09:15:07+09:00 Subject: Re: Faking the refering page with Mechanize --nextPart41187632.JilsAVpPAK Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Quoth Ehud Rosenberg: > Hi, > I am trying to access a certain web page from my server, but I want the > referring page to be a different one. > It seems the the get method accepts both a url and a "ref" parameter > that is is supposed to be the referring page, but when I try to send > that url as follows: > agent.get(url_to_get, "http://www.mininova.org") > I get the following error: > ndefined method `uri' for "http://www.mininova.org":String. >=20 > Anyone knows what is the correct way to do this? >=20 > Thanks! > Ehud What you need to do is create a Mechanize::URI object (or something like th= at)=20 from the string "http://www.mininova.org", and call #get() with that. HTH, =2D-=20 Konrad Meyer http://konrad.sobertillnoon.com/ --nextPart41187632.JilsAVpPAK Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBHL7IFCHB0oCiR2cwRAok9AJ9x1EXflcr6wtcwDWBIZkMzlM6HGQCfWtsi 15cUs2MVR89cHcDGbLLC+yU= =jmsj -----END PGP SIGNATURE----- --nextPart41187632.JilsAVpPAK--