Method: Wechat::Api::Client#post
- Defined in:
- lib/wechat/api/client.rb
#post(uri, data = {}) ⇒ Object
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/wechat/api/client.rb', line 61 def post(uri, data = {}) with_access_token(uri, {}) do |url, params| debug_request do connection.post do |req| req.url url, params req.headers[:accept] = 'application/json' req.headers[:content_type] = 'application/json' req.body = MultiJson.dump(data) end end end end |