Method: Bixby::HttpClient#http_post_json

Defined in:
lib/bixby-common/util/http_client.rb

#http_post_json(url, data) ⇒ Object

Execute an HTTP POST request (see #http_get) and parse the JSON response

Parameters:

  • url (String)
  • data (Hash)

    Key/Value pairs to POST

Returns:

  • (Object)

    Result of calling JSON.parse() on the response body



44
45
46
# File 'lib/bixby-common/util/http_client.rb', line 44

def http_post_json(url, data)
  MultiJson.load(http_post(url, data))
end