Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
Advice for Net::HTTP class
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Bojan Mihelac, post: 4523058"] Hello, I am loosing myself with Net:HTTP class, following HowToRenderProxiedPages article I cannot make post method to proxy parameters to web page. require 'net/http' ### p.php <?php print_r($_POST)?> ### 1. does not work response = Net::HTTP.start('localhost', 80) { |http| http.post('/p.php', 'query=ruby') } puts response ### 2. works response = Net::HTTP.post_form(URI.parse('[URL]http://localhost/p.php[/URL]'), { "query" => "ruby"}) puts response Can anyone please explain me why the first one doesn't work? (I am using Ruby 1.8.4, tested both linux and win) thanx, Bojan Mihelac [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
Advice for Net::HTTP class
Top