Microweber\Utils\Adapters\Http\Guzzle::post PHP Method

post() public method

public post ( $data = false )
    public function post($data = false)
    {
        $client = new Client();
        $response = $client->post($this->url, ['body' => $data, 'timeout' => $this->timeout, 'verify' => __DIR__ . DS . 'cacert.pem.txt']);
        $r = '';
        $body = $response->getBody();
        if (is_object($body) and method_exists($body, 'eof')) {
            while (!$body->eof()) {
                $r .= $body->read(1024);
            }
        } else {
            return $body;
        }
        return $r;
    }