Net::HTTP and POST Data

Discussion in 'Ruby' started by Evan DiBiase, Nov 11, 2005.

  1. Evan DiBiase

    Evan DiBiase Guest

    Hi!

    Has anyone run into trouble using 1.8.3 (Cygwin, on Windows,
    specifically) and Net::HTTP's POST functionality?

    It used to be that code like the following would pass the parameter
    "foo" with the value "bar" to "http://myserver/servlet", but, on the
    aforementioned configuration, the servlet (or PHP script; I've tested
    both) doesn't seem to get the parameter:

    Net::HTTP.start("myserver", 80) { |http| http.post("/servlet",
    "foo=bar") }

    Does anyone have a clue about what might be wrong? I'm using POST
    data (instead of URL encoding) because the server with which I'm
    communicating has hard limits on the URL size that I would exceed in
    a few cases.

    Thanks,
    Evan
     
    Evan DiBiase, Nov 11, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    6,047
    Tor Iver Wilhelmsen
    Aug 29, 2005
  2. James
    Replies:
    3
    Views:
    16,616
    Roedy Green
    Nov 25, 2005
  3. ColinK
    Replies:
    0
    Views:
    591
    ColinK
    Jul 15, 2007
  4. serge calderara

    HTTP GET vs HTTP POST protocol

    serge calderara, Nov 4, 2005, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    651
  5. n3d!m

    Http post and http get

    n3d!m, Jan 25, 2012, in forum: Python
    Replies:
    2
    Views:
    390
    n3d!m
    Feb 6, 2012
Loading...

Share This Page