search for: request_data

Displaying 5 results from an estimated 5 matches for "request_data".

2010 Jun 10
2
submit button param is duplicated when a form is submitted a second time
...#39;' require ''mechanize'' agent = Mechanize.new page = agent.get(''http://google.com/'') google_form = page.form(''f'') google_form.q = ''ruby mechanize'' page = agent.submit(google_form, google_form.buttons.last) pp google_form.request_data page = agent.submit(google_form, google_form.buttons.last) pp google_form.request_data
2010 Sep 01
4
NoMethodError: undefined method `force_encoding' for "Conten
......................EEEE.EE... Finished in 1.068686 seconds. 1) Error: test_post_multipart(FormsMechTest): NoMethodError: undefined method `force_encoding'' for "Content-Disposition: form-data; name=\"first_name\"\r\n\r\n\r\n":String ./lib/mechanize/form.rb:229:in `request_data'' ./lib/mechanize/form.rb:229:in `collect'' ./lib/mechanize/form.rb:229:in `request_data'' ./lib/mechanize.rb:483:in `post_form'' ./lib/mechanize.rb:387:in `submit'' ./test/test_forms.rb:187:in `test_post_multipart'' 2) Error: t...
2008 Mar 11
8
Mechanize#get vs Mechanize#fetch_page
...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 of the test cases. It''d be cool if I could make use of that parameter as request_data since I think it would be exactly the function I''m looking f...
2010 Jun 03
3
issue submitting a form
....gem/ruby/1.8/gems/mechanize-1.0.0/lib/mechanize/form.rb:171:in `sort'' from /Users/lukastolyarov/.gem/ruby/1.8/gems/mechanize-1.0.0/lib/mechanize/form.rb:171:in `build_query'' from /Users/lukastolyarov/.gem/ruby/1.8/gems/mechanize-1.0.0/lib/mechanize/form.rb:221:in `request_data'' from /Users/lukastolyarov/.gem/ruby/1.8/gems/mechanize-1.0.0/lib/mechanize.rb:452:in `post_form'' from /Users/lukastolyarov/.gem/ruby/1.8/gems/mechanize-1.0.0/lib/mechanize.rb:370:in `submit'' from downloader.rb:16:in `downloader'' f...
2009 Sep 25
0
WWW::Mechanize and Rails console not playing well
...om /usr/lib/ruby/1.8/www/mechanize/util.rb:9:in `build_query_string'' from /usr/lib/ruby/1.8/www/mechanize/util.rb:6:in `map'' from /usr/lib/ruby/1.8/www/mechanize/util.rb:6:in `build_query_string'' from /usr/lib/ruby/1.8/www/mechanize/form.rb:199:in `request_data'' from /usr/lib/ruby/1.8/www/mechanize.rb:387:in `post_form'' from /usr/lib/ruby/1.8/www/mechanize.rb:331:in `submit'' from (irb):23 >> Here''s the code: #!/usr/local/bin/ruby require ''rubygems'' require ''mech...