Net::HTTP and POST Data

E

Evan DiBiase

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top