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. Advertisements

  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. Advertisements

  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. Advertisements

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. Replies:
    6
    Views:
    7,224
    Tor Iver Wilhelmsen
    Aug 29, 2005
  2. James
    Replies:
    3
    Views:
    17,327
    Roedy Green
    Nov 25, 2005
  3. ColinK
    Replies:
    0
    Views:
    711
    ColinK
    Jul 15, 2007
  4. Slie
    Replies:
    3
    Views:
    1,151
    Tim Harig
    Jan 6, 2011
  5. Matty J
    Replies:
    0
    Views:
    469
    Matty J
    Apr 20, 2008
  6. scootiePuff
    Replies:
    4
    Views:
    384
    Rilindo Foster
    Aug 21, 2009
  7. TG
    Replies:
    0
    Views:
    366
  8. Julio F Schwarzbeck

    RESTful API for own python application

    Julio F Schwarzbeck, Feb 2, 2013, in forum: Python
    Replies:
    0
    Views:
    265
    Julio F Schwarzbeck
    Feb 2, 2013
Loading...