hmm, i usually use httparty<http://railstips.org/blog/archives/2008/07/29/it-s-an-httparty-and-everyone-is-invited/> for these kind of stuff so I don't have to worry about the Net::HTTP class.
On Tue, Feb 8, 2011 at 8:49 AM, bhavik <[email protected]> wrote: > Hi, > > I am working on sending data via a Post request from a rails > application to a java servlet running on tomcat on the same machine > (localhost:8080). > However when I use > res = Net::HTTP.post_form(URI.parse('http://localhost:8080/'), > {'q'=>'ruby', 'max'=>'50'}) > render text: res.body > > It just goes to this uri http://localhost:3000/posts/submit > and shows me the apache tomcat homepage > It does not actually go to the tomcat application. (I could check this > with breakpoints) > > I think I am not using the right URI. > Please let me know of the right URI to use or please let me know of > some sample working URIs that you know of where I can post and see the > results of the post request. > That would help me ascertain if the Post request is working or not. > > Thanks, > Bhavik > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

