-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi @ all,
I''m new to this list, so sorry if this was already asked or if this is
a
stupid question..
I struggled a lot about how to set a custom Header, the manual says:
| get(options, parameters = [], referer = nil)
| Fetches the URL passed in and returns a page.
I assume that the third parameter will set a custom Referer, I try this:
require ''mechanize''
agent = WWW::Mechanize.new
page =
agent.get(''http://apoc.sixserv.org/requestinfo/?referer'', nil,
''http://google.com/this/is/a/custom/referer'')
puts page.body
but this does not work, then ages later I try:
page = agent.get(:url =>
''http://apoc.sixserv.org/requestinfo/?referer'',
:referer => ''http://google.com/this/is/a/custom/referer'')
puts page.body
this works, why the first one not? does referer in the documentation
means something else?
bye
apoc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkocuq0ACgkQWlhozqFVuMsgsACfV1SpcZwP7P7hrFX6gNt0pbhu
nwwAn1D/whCX0OAiTkVjkD+zU5zaaOre
=eQ+W
-----END PGP SIGNATURE-----