Automattic\WooCommerce\Vendor\GraphQL\Server

Helper::readRawBody │ protected │ WC 1.0

Method of the class: Helper{}

No Hooks.

Returns

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->readRawBody(): string;

Helper::readRawBody() code WC 11.1.2

protected function readRawBody(): string
{
    $body = file_get_contents('php://input');
    if ($body === false) {
        throw new CannotReadBody('Cannot not read body.');
    }

    return $body;
}