HTTP client to post XML RAW_DATA to restful API

Discussion in 'Ruby' started by Costa Nicolaou, Sep 16, 2010.

  1. Hey

    I am trying to find out how to send an XML in string as RAW_DATA to a
    RESTful API.

    I found out a couple of libraries (Nestful, Restfulclient, curb) but
    wasn't able to send the content properly as you'd send it from Rails
    Functional tests @request.env['RAW_POST_DATA'] = xml.to_s

    Any suggestions?

    Costa
    --
    Posted via http://www.ruby-forum.com/.
    Costa Nicolaou, Sep 16, 2010
    #1
    1. Advertising

  2. Costa Nicolaou wrote:
    > Any suggestions?


    restclient can do this. Otherwise, just use Net::HTTP directly.
    --
    Posted via http://www.ruby-forum.com/.
    Brian Candler, Sep 16, 2010
    #2
    1. Advertising

  3. Brian Candler wrote:
    > Costa Nicolaou wrote:
    >> Any suggestions?

    >
    > restclient can do this. Otherwise, just use Net::HTTP directly.


    Cheers for that

    Any examples? although the docs are quite good, it is not clear how to
    send the XML string as RAW_DATA
    --
    Posted via http://www.ruby-forum.com/.
    Costa Nicolaou, Sep 17, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matty J
    Replies:
    0
    Views:
    320
    Matty J
    Apr 20, 2008
  2. scootiePuff
    Replies:
    4
    Views:
    181
    Rilindo Foster
    Aug 21, 2009
  3. TG
    Replies:
    0
    Views:
    263
  4. Julio F Schwarzbeck

    RESTful API for own python application

    Julio F Schwarzbeck, Feb 2, 2013, in forum: Python
    Replies:
    0
    Views:
    158
    Julio F Schwarzbeck
    Feb 2, 2013
  5. dieter
    Replies:
    0
    Views:
    135
    dieter
    Feb 3, 2013
Loading...

Share This Page