Method: Sinew::DSL#post_json
- Defined in:
- lib/sinew/dsl.rb
#post_json(url, json = {}) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/sinew/dsl.rb', line 46 def post_json(url, json = {}) body = json.to_json headers = { 'Content-Type' => 'application/json', } http('post', url, body: body, headers: headers) end |