SimpleSoftwareIO\SMS\Drivers\FlowrouteSMS::postRequest PHP Method

postRequest() protected method

Creates and sends a POST request to the requested URL.
protected postRequest ( ) : mixed
return mixed
    protected function postRequest()
    {
        $response = $this->client->post($this->buildUrl(), ['auth' => $this->getAuth(), 'json' => $this->getBody()]);
        if ($response->getStatusCode() != 201 && $response->getStatusCode() != 200) {
            $this->SMSNotSentException('Unable to request from API.');
        }
        return $response;
    }