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.
If the http server doesn’t care about the path can’t you just use any?
such
as ‘/’
and I get
getaddrinfo: no address associated with hostname (Socket Error)
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)