Skip to content

Instantly share code, notes, and snippets.

@jerodsanto
Created January 4, 2010 20:55
Show Gist options
  • Save jerodsanto/268855 to your computer and use it in GitHub Desktop.
Save jerodsanto/268855 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'net/http'
host = "8.7.192.55"
port = 4250
body = File.read("test.xml")
header = {'Content-Type' => 'xml'}
response = Net::HTTP.start(host, port) do |http|
http.post("AssignOrder.xml", body, header)
end
puts response.body
File.open("response.xml","w") { |f| f.puts response.body }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment