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:
parent
9c08f47bcb
commit
35e4339d3c
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ class Twitter
|
|||
end
|
||||
|
||||
def post(text)
|
||||
options = { :query => {:status => text}, :basic_auth => @auth }
|
||||
options = { :body => {:status => text}, :basic_auth => @auth }
|
||||
self.class.post('/statuses/update.json', options)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue