I have page with js that post data via XMLHttpRequest and server side script check for this header, how to send this header?
agent = WWW::Mechanize.new { |a| a
Seems like earlier that lambda had one argument, but now it has two:
agent = Mechanize.new do |agent| agent.pre_connect_hooks << lambda do |agent, request| request["Accept-Language"] = "ru" end end