Intercom\IntercomClient::post PHP Method

post() public method

Sends POST request to Intercom API.
public post ( string $endpoint, string $json ) : mixed
$endpoint string
$json string
return mixed
    public function post($endpoint, $json)
    {
        $response = $this->http_client->request('POST', "https://api.intercom.io/{$endpoint}", ['json' => $json, 'auth' => $this->getAuth(), 'headers' => ['Accept' => 'application/json']]);
        return $this->handleResponse($response);
    }