# Https post with xml data?

**URL:** <https://www.ruby-forum.com/t/https-post-with-xml-data/163970>\
**Category:** Ruby\
**Created:** [March 26, 2009, 3:59pm UTC](https://www.ruby-forum.com/t/https-post-with-xml-data/163970 "2009-03-26T15:59:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [March 26, 2009, 3:59pm UTC](https://www.ruby-forum.com/t/https-post-with-xml-data/163970/1 "2009-03-26T15:59:47Z")

</div>

I need to post some XML (not form encoded, just raw XML in the body) to  
an https url.

I’m having trouble figuring out how to do this with Net::HTTP. Both  
the https issue and the request body issue.

Anyone have any hints or examples? Thanks!

Jonathan

---

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [March 26, 2009, 5:33pm UTC](https://www.ruby-forum.com/t/https-post-with-xml-data/163970/2 "2009-03-26T17:33:59Z")

</div>

On Mar 26, 2009, at 8:56 AM, Jonathan R. wrote:

> I need to post some XML (not form encoded, just raw XML in the body)  
> to  
> an https url.
> 
> I’m having trouble figuring out how to do this with Net::HTTP. Both  
> the https issue and the request body issue.
> 
> Anyone have any hints or examples? Thanks!

give up. use restclient.

sudo gem install rest-client

if you really want to know how to do it read the restclient code - it  
uses net/http under the hood.

cheers.

a @ [http://codeforpeople.com/](http://codeforpeople.com/)

---

<div class="post-metadata">

**Author:** ![jrochkind](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Post date:** [August 8, 2009, 7:33am UTC](https://www.ruby-forum.com/t/https-post-with-xml-data/163970/3 "2009-08-08T07:33:41Z")

</div>

Ara Howard wrote:

> give up. use restclient.

Excellent advice. I wish I had stumbled upon it 4 hours earlier…
