From: Fred Date: 2008-04-24T17:45:07+09:00 Subject: Re: HTTP::Post - HTTP::Get (Can someone help me?) Thanx Darren for the info What i want to do: Interact with a site and change behaviour without going to the site itself. I have to do 2 steps. def connect uri = URI.parse(BASE_ADDRESS) HTTP.version_1_1 @http = HTTP.start(uri.host, uri.port) end 1. The first one succeed with connect req = HTTP::Post.new("...") add_headers req, "......" res = @http.request(req) puts res.body @http.finish When i look into res.body i see that the first step is good. 2. Now the second step is to simulate a POST (submit button) from the first step. req = HTTP::Post.new("....") add_headers req, "...." connect res = @http.request(req) puts res.body @http.finish When i look into res.body i see nothing. I also tried the connect before the req in the second step but it changed nothing. The second step has to change the first step ( activate the submit button) but it doesn't work. I hope you understand it a little bit. Can someone help me with this? Thanks darren kirby schreef: > quoth the Fred: >> Hello, >> >> I'm lost. >> Can someone explain good to me what the difference is between these 2 >> methods? > > 'GET' and 'POST' are two 'request methods' which are part of the HTTP spec. > Your two methods are ruby implementations of such request methods. Read this: > http://en.wikipedia.org/wiki/Http#Request_methods > > ..and you will see they are quite different. > >> I have a HTTP:Post and when i check the body, i see exacly what he has >> to do. But it doesn't do it in reality. >> How can i resolve the problem? > > I have no idea what you are getting at here. Please repost with: > * A clear description of what you want to accomplish > * How what you are doing now is failing (include error messages) > * Your failing code > * excerpt of your data causing a failure (if applicable) > > If you include all this, you will certainly recieve a more helpful response. > >> thank you > > -d