# Https post with xml data?

**URL:** <https://rubytalk.org/t/https-post-with-xml-data/52515>\
**Category:** ruby-talk\
**Created:** [26 March 2009 14:56 UTC](https://rubytalk.org/t/https-post-with-xml-data/52515 "2009-03-26T14:56:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Rochkind](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@Jonathan\_Rochkind](https://rubytalk.org/u/Jonathan_Rochkind)\
**Post date:** [26 March 2009 14:56 UTC](https://rubytalk.org/t/https-post-with-xml-data/52515/1 "2009-03-26T14:56:29Z")

</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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![a11](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/a11/32/8169_2.png) [@a11](https://rubytalk.org/u/a11)\
**Post date:** [26 March 2009 16:29 UTC](https://rubytalk.org/t/https-post-with-xml-data/52515/2 "2009-03-26T16:29:56Z")

</div>

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/)

> **···**
>
> On Mar 26, 2009, at 8:56 AM, Jonathan Rochkind 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!
> 
> --  
> we can deny everything, except that we have the possibility of being better. simply reflect on that.  
> h.h. the 14th dalai lama

---

<div class="post-metadata">

**Author:** ![Stephen\_Mautrin](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@Stephen\_Mautrin](https://rubytalk.org/u/Stephen_Mautrin)\
**Post date:** [8 August 2009 05:33 UTC](https://rubytalk.org/t/https-post-with-xml-data/52515/3 "2009-08-08T05:33:50Z")

</div>

Ara Howard wrote:

> give up. use restclient.

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

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
