search for: set_form_data

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

2012 May 25
1
Connect reset by peer error
...;'Connection reset by peer'' while getting an access token during oAuth from a third party API. Here''s the code snippet: def accesstoken @code = params[:code] url = URI.parse(''access token request url'') req = Net::HTTP::Post.new(url.path) req.set_form_data({''auth_code'' => @code, ''client_id''=>''my_client_id'', ''client_secret''=>''my_secret_key''}, '';'') res = Net::HTTP.new(url.host, url.port).start { |http| http.request(req) } case res...
2010 Jun 09
12
Foreman -- Reporting
Hello All, I don''t seem to be able to get reports to display on the foreman interface. I copied extras/puppet/foreman/files/foreman-report.rb to / usr/lib/ruby/site_ruby/1.8/puppet/reportsforeman.rb, instead of /usr/ lib/ruby/1.8/puppet/reports/foreman.rb. Config: Centos5.4, Apache/ Passenger, Puppet 0.25.4. The reports are coming from the clients, because I can see them in
2011 Oct 11
0
Mechanize gem. What's the price?
...reintime.bla", {''tagid'' => ''b6'', ''source'' => ''email'' }) The code I was using with Net::HTTP was (gives me EOF error): url = URI.parse("https://somewhereintime.bla") req = Net::HTTP::Post.new(url.path) req.set_form_data({ ''tagid'' => ''b6'', ''source'' => ''email'' }) res = Net::HTTP.new(url.host, 443).start {|http| http.request(req)} res.use_ssl = true -------- So what is the price? Less code, works better. There must be a price. I''...