Help using NET::HTTP POST

Team,

I would like to use NET::HTTP to POST an xml file to a site. I am having
some difficulties getting it to work. I know the remote site works as other
people using Java reported it working fine.
I have the following segment:

require 'net/http'
require 'uri'

uri = URI.parse("http://mywebsite.com:7080/CardReader")

http = Net::HTTP.new(uri.host, uri.port)

myData = "<?xml version="1.0" encoding="UTF-8"?>
<!--Sample XML file generated by XMLSpy v2007 rel. 3 sp1 (
http://www.altova.com)-->
<site sitetype="0" id="00000000-0000-0000-0000-000000000000"
instance="00000000-0000-0000-0000-000000000000"
name="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
xsi:schemaLocation="thefirm:readcore Site.xsd" xmlns="thefirm:readcore"
xmlns:xsi="http://www.w3w.org/2001/XMLSchema-instance">
<domain>0</domain>
<position errorradius="3.14159265358979E0" lat="-90" long="-180"/>
<parent>00000000-0000-0000-0000-000000000000</parent>
</site>"

QUESTION:
How do I send (POST) that data (myData) to the URL list above?

Thank you

···

--
Ruby Student

read `ri Net::HTTP`

···

On May 1, 2014, at 12:01, Ruby Student <ruby.student@gmail.com> wrote:

How do I send (POST) that data (myData) to the URL list above?

Will do.

Thank you

···

On Thu, May 1, 2014 at 3:05 PM, Ryan Davis <ryand-ruby@zenspider.com> wrote:

On May 1, 2014, at 12:01, Ruby Student <ruby.student@gmail.com> wrote:

> How do I send (POST) that data (myData) to the URL list above?

read `ri Net::HTTP`

--
Ruby Student