1
0
Fork 0
mirror of https://github.com/jnunemaker/httparty synced 2023-03-27 23:23:07 -04:00

Update README.md

the code example has a bug. When making a POST request (using the post(...) method), the options should have a :body parameter, not the :query parameter. The :query parameter is only good for GET requests (that use the get(...) method)
This commit is contained in:
thesocialgeek 2012-07-25 18:44:07 +03:00
parent 9c08f47bcb
commit 35e4339d3c

View file

@ -41,7 +41,7 @@ class Twitter
end end
def post(text) def post(text)
options = { :query => {:status => text}, :basic_auth => @auth } options = { :body => {:status => text}, :basic_auth => @auth }
self.class.post('/statuses/update.json', options) self.class.post('/statuses/update.json', options)
end end
end end