Method: DiscourseApi::Client#post
- Defined in:
- lib/discourse_api/client.rb
#post(path, params = {}) ⇒ Object
71 72 73 74 75 76 77 78 79 |
# File 'lib/discourse_api/client.rb', line 71 def post(path, params={}) response = request(:post, path, params) case response.status when 200 response.body else raise DiscourseApi::Error, response.body end end |