search for: cur_pag

Displaying 3 results from an estimated 3 matches for "cur_pag".

Did you mean: cur_page
2008 Jan 16
3
settings headers in mechanize
hi, a potential mechanize user here. i''ve looked at the API but it''s not clear what capacity there is to arbitrarily set the headers - does mechanize allow for this? mechanize is clearly great for web browsing, but i also need to construct get and post requests from scratch. i''ve looked at net:http, libcurl, openuri, but mechanize seems simpler and more functional than
2006 Dec 09
1
manipulate headers?
...ogspot.com" ); $mech->add_header( Cookie => "messageid=170118; memberid=1007"); $mech->get($url) so the header values for Referer and Cookie are passed with the HTTP GET. There seems to be an add_field method in mechanize.rb: request.add_field(''Referer'', cur_page.uri.to_s) and rdoc (http://mechanize.rubyforge.org/) indicates an add_field value for Net::HTTPHeader, but the example is funny, because the example says "add_header", not "add_field". In either case, none of the "add_*" statements in the script below work, each yie...
2008 Mar 11
8
Mechanize#get vs Mechanize#fetch_page
...ke this: WWW::Mechanize.new(''http://api.flickr.com/services/rest/'', {:method => ''flickr.auth.getFrob''... }) Granted, it looks like this isn''t supported but it led me to what looks like a bug. Namely that get calls fetch_page(abs_uri, request, cur_page, &block) [mechanize.rb:167]. But the method signature for fetch_page [mechanize.rb:441] is def fetch_page(uri, request, cur_page=current_page(), request_data=[]). What was the intention for the &block on Mechanize#get? I can''t find any examples of it getting used in any o...