for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* BongaTech SMS Client Library for PHP.
*
* @copyright Copyright (c) 2017
* @author Vincent Mosoti <[email protected]>
* @license https://github.com/VMosoti/bongatech-sms/blob/master/LICENSE
*/
namespace VMosoti\BongaTech;
use Unirest\Request\Body;
use Unirest\Request as UniRequest;
class Request
{
* the request url.
* @var string
public $endpoint;
* request headers.
* @var array
public $headers;
* request body.
public $body;
* the response is in form of a string.
public $response;
* Request constructor.
* @param $endpoint
* @param array $headers
* @param array $body
public function __construct($endpoint, array $headers, array $body)
$this->endpoint = $endpoint;
$this->headers = $headers;
$this->body = $body;
}
public function send()
return UniRequest::post($this->endpoint, $this->headers, Body::Json($this->body));