Basically I just need a simple HTTP post where I specify an xml.
I'm trying to use Net::HTTP post but in my case I don't have a path to
specify as first parameter.
I jut need to send HTTP(S) POST request with single parameter named xml.
The server response is a normal XML document.
Basically I just need a simple HTTP post where I specify an xml.
I'm trying to use Net::HTTP post but in my case I don't have a path to
specify as first parameter.
I jut need to send HTTP(S) POST request with single parameter named xml.
The server response is a normal XML document.
--
The UNIX system has a command, nice ... in order to be nice to the other
users. Nobody ever uses it." - Andrew S. Tanenbaum
With the disclaimer than i haven't used net/http much, the following
three forms all seem to post to manage.encoding.com and get back a 200
OK response.
require 'net/http'
require 'uri'
# this is the closest form to the one you tried
# note that the http protocol is excluded
# (presumably because we're explicitly constructing an HTTP object)
# this form uses the post_form class method and a parsed uri
# note the trailing slash is necessary
# note also the (cleaner) use of a hash over a string for post params
# this is the closest form to the one you tried
# note that the http protocol is excluded
# (presumably because we're explicitly constructing an HTTP object)