The following barebones Ruby code is the result of a quick implementation:
require 'net/https'
require 'uri'
auth_xml = (access request xml doc goes here)
req_xml = (request xml doc goes here)
both_xml = auth_xml + req_xml
url = URI.parse("https://....")
request = Net::HTTP::Post.new(url.path)
request.body = (both_xml)
request.content_type = 'application/x-www-form-urlencoded'
http = Net::HTTP.new(url.host,443)
#http.set_debug_output $stderr
http.use_ssl = true
http.timeout = 30
@response = nil
http.start do
@response = http.request(request)
end
p @response.body
No comments:
Post a Comment