1
0
forked from qwerty/milfs
milfskleper/rest/vendor/slim/slim/Slim/Http/RequestBody.php
2018-10-13 12:01:33 -05:00

28 lines
643 B
PHP

<?php
/**
* Slim Framework (https://slimframework.com)
*
* @link https://github.com/slimphp/Slim
* @copyright Copyright (c) 2011-2017 Josh Lockhart
* @license https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)
*/
namespace Slim\Http;
/**
* Provides a PSR-7 implementation of a reusable raw request body
*/
class RequestBody extends Body
{
/**
* Create a new RequestBody.
*/
public function __construct()
{
$stream = fopen('php://temp', 'w+');
stream_copy_to_stream(fopen('php://input', 'r'), $stream);
rewind($stream);
parent::__construct($stream);
}
}