Hi all,

I need to do POST/PUT operation using httparty.

I have a default class as follows

require 'httparty'

class Webclient
include HTTParty

def intialize(options = {})
# parameters to build the url
end
end

with the help of httparty,
i can easily use get operation as follows

Webclient.get("url")

Can anyone give me an example of how to do POST/PUT operations through
httparty over a Rest webservice, where i need to post/Put the entire XML

for example,
XML content is like below
<ns:sample xmlns:ns="somelocation">
<attributes></attributes>
</ns:sample>

I need to post/put the whole xml content using HTTParty as

Webclient.post(url,"XMLContent")
Webclient.put(url,"XMLContent")

can any one give me an example of how to post/put the whole xml using
httparty under a class which includes httparty

Thanks in advance

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 9, '11 at 7:08p
activeDec 9, '11 at 7:08p
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Ruban PA: 1 post

People

Translate

site design / logo © 2022 Grokbase