lib/sinew/base.rb
# http post json, returns a Response
http post json, returns a Response
http post json returns a Response
def post_json(url, body = nil, headers = nil)
      body = body.to_json
      headers = (headers || {}).merge('Content-Type' => 'application/json')
      post(url, body, headers)
    end
def post_json ( url , body = nil , headers = nil ) body = body . to_json headers = ( headers || { } ) . merge ( 'Content-Type' => 'application/json' ) post ( url , body , headers ) end
http post json, returns a Response
http post json returns a Response
url
<not_specific>
body
<not_specific>
headers
<not_specific>