Module: TwitterTweetBot::API::HTTP::Post
- Includes:
- Base
- Included in:
- TwitterTweetBot::API::HTTP
- Defined in:
- lib/twitter_tweet_bot/api/http/post.rb
Instance Method Summary collapse
- #request_post_form(url, body, headers = {}) ⇒ Object
- #request_post_json(url, body, headers = {}) ⇒ Object
Methods included from Base
Instance Method Details
#request_post_form(url, body, headers = {}) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/twitter_tweet_bot/api/http/post.rb', line 15 def request_post_form(url, body, headers = {}) request_post( url, URI.encode_www_form(body), headers.merge('content-type' => URLENCODED_CONTENT_TYPE) ) end |
#request_post_json(url, body, headers = {}) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/twitter_tweet_bot/api/http/post.rb', line 23 def request_post_json(url, body, headers = {}) request_post( url, body.to_json, headers.merge('content-type' => JSON_CONTENT_TYPE) ) end |