From: Tim Uckun Date: 2006-05-24T18:47:23+09:00 Subject: Re: Get and Post Combined ? use sockspy. It's invaluable for stuff like this. BTW is there a ruby version of sockspy? On 5/24/06, Tim Becker wrote:> Is the server under your control? Can you be certain that the server> isn't just returning the form even though you're posting data? My next> step would be to check what actually gets sent to the server using a> sniffer.> -tim>> On 5/24/06, Doug Bromley wrote:> > Hell. Apologies. Thats a typo.> > The variables are the same.> >> > #---------------------------------------------------------------------------------------------------> > host = "secure.ysm1.com"> > port = 443> > now = Date::today()> > yday = @now - 1> >> > #The path with its get variables> > path = "/index.jhtml?_ARGS=/index.jhtml"> >> > xml = "XML Encoded POST Data"> >> > site = Net::HTTP.new(@host, 443)> > site.use_ssl = true> > enc_text = "xml=" << CGI.escape(@xml)> >> > resp, data = site.post> > (path,enc_text,{"Content-Type"=>"application/x-www-form-urlencoded"})> >> > puts data # Should print XML formatted result but instead displays route> > of that server (the form HTML) as if no data was sent.> > #---------------------------------------------------------------------------------------------------> >> > On 5/23/06, Tim Becker wrote:> > >> > > > #The path with its get variables> > > > path = "/index.jhtml?_ARGS=/index.jhtml"> > >> > > Called `path` here...> > >> > > ...> > > >> > > > site = Net::HTTP.new(@host, 443)> > > > enc_text = "xml=" << CGI.escape(@xml)> > > >> > > > resp, data = site.post(URI.parse> > > >> > > (@full_path),enc_text,{"Content-Type"=>"application/x-www-form-urlencoded"})> > >> > > and `@full_path` here. Are you sure it's the same variable?> > > -tim> > >> > >> >> >>>