src/TeamsConnector.php
public function send(TeamsConnectorInterface $card)
    {
        $json = json_encode($card->getMessage());

        $ch = curl_init($this->webhookUrl);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
        curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
        curl_setopt($ch, CURLOPT_HTTPHEADER, [
            'Content-Type: application/json',
            'Content-Length: ' . strlen($json)
        ]);

        $result = curl_exec($ch);

        if ($result !== "1") {
            throw new \Exception($result);
        }
    }
public function send(TeamsConnectorInterface $card)
    {
        $json = json_encode($card->getMessage());

        $ch = curl_init($this->webhookUrl);
        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
        curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 3);
        curl_setopt($ch, CURLOPT_HTTPHEADER, [
            'Content-Type: application/json',
            'Content-Length: ' . strlen($json)
        ]);

        $result = curl_exec($ch);

        if ($result !== "1") {
            throw new \Exception($result);
        }
    }
public function send ( TeamsConnectorInterface $ card ) { $ json = json_encode ( $ card -> getMessage ( ) ) ; $ ch = curl_init ( $ this -> webhookUrl ) ; curl_setopt ( $ ch , CURLOPT_CUSTOMREQUEST , 'POST' ) ; curl_setopt ( $ ch , CURLOPT_POSTFIELDS , $ json ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , true ) ; curl_setopt ( $ ch , CURLOPT_TIMEOUT , 10 ) ; curl_setopt ( $ ch , CURLOPT_CONNECTTIMEOUT , 3 ) ; curl_setopt ( $ ch , CURLOPT_HTTPHEADER , [ 'Content-Type: application/json' , 'Content-Length: ' . strlen ( $ json ) ] ) ; $ result = curl_exec ( $ ch ) ; if ( $ result !== "1" ) { throw new \ Exception ( $ result ) ; } }
Sends card message as POST request

@param  TeamsConnectorInterface $card
@throws Exception
Sends card message as POST request