Displaying 2 results from an estimated 2 matches for "http_obj".
2008 May 03
0
marshalling mechanized
...al.dump(a)
you get a problem. in particular, "TypeError: can''t dump TCPSocket".
basically, don''t try to marshal a socket.
however, if we make sure to finish the http connection after each use,
then the agent can be marshalled safely. i accomplished this by
inserting:
http_obj.finish
immediately prior to this line:
return page if res_klass <= Net::HTTPSuccess
in mechanize.rb, which is approximately line 587 in v 0.7.0
this is a crude hack that doesn''t, i think, respect keep-alive
connections, but it does at least work for the purpose of ensuring the
a...
2008 Mar 11
8
Mechanize#get vs Mechanize#fetch_page
So I found myself wanting to call Mechanize#get with a hash for
arguments like 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)