Hello, I am trying to debug a problem where an action submits a form unsuccessfully. The code I''m looking at looks just like the code on Ruby-Doc for post_form: url = "https://some.url.com" res = Net::HTTP.post_form( URI.parse(url), { ''formid'' => formid, ''Contact0FirstName'' => first_name, ''Contact0LastName'' => last_name, ''Contact0Phone1'' => phone, ''Contact0Email'' => email, ''type'' => type } ) However, post_form is throwing the exception: wrong status line: "\025\003\001\000\002\002". Can anyone shed some light on what this error message means? Thanks! --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Matt White wrote:> I am trying to debug a problem where an action submits a form > unsuccessfully. The code I''m looking at looks just like the code on > Ruby-Doc for post_form: > > url = "https://some.url.com" > res = Net::HTTP.post_form( > URI.parse(url), > { > ''formid'' => formid, > ''Contact0FirstName'' => first_name, > ''Contact0LastName'' => last_name, > ''Contact0Phone1'' => phone, > ''Contact0Email'' => email, > ''type'' => type > } > ) > > However, post_form is throwing the exception: wrong status line: > "\025\003\001\000\002\002". Can anyone shed some light on what this > error message means? Thanks!Perhaps you''ve required net/http instead of net/https. -- We develop, watch us RoR, in numbers too big to ignore. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Didn''t make a difference. I tried posting with the Mechanize gem and it works though, so whatever Mechanize is doing under the covers for a post is better than what I was doing. On Dec 7, 7:58 pm, Mark Reginald James <m...-bzGI/hKkdgQnC9Muvcwxkw@public.gmane.org> wrote:> Matt White wrote: > > I am trying to debug a problem where an action submits a form > > unsuccessfully. The code I''m looking at looks just like the code on > > Ruby-Doc for post_form: > > > url = "https://some.url.com" > > res = Net::HTTP.post_form( > > URI.parse(url), > > { > > ''formid'' => formid, > > ''Contact0FirstName'' => first_name, > > ''Contact0LastName'' => last_name, > > ''Contact0Phone1'' => phone, > > ''Contact0Email'' => email, > > ''type'' => type > > } > > ) > > > However, post_form is throwing the exception: wrong status line: > > "\025\003\001\000\002\002". Can anyone shed some light on what this > > error message means? Thanks! > > Perhaps you''ve required net/http instead of net/https. > > -- > We develop, watch us RoR, in numbers too big to ignore.--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---