1 # void http\Message\Body::__construct([resource $stream = NULL])
3 Create a new message body, optionally referencing $stream.
7 * Optional resource $stream = NULL
8 A stream to be used as message body.
12 * http\Exception\InvalidArgumentException
13 * http\Exception\UnexpectedValueException
20 $body = new http\Message\Body(fopen(__FILE__, "r"));
21 $resp = new http\Env\Response;
22 $resp->setContentType("text/plain");
23 $resp->setBody($body);
30 X-Powered-By: PHP/5.5.5
31 Content-Type: text/plain
32 ETag: "138042e-527b5a0a-1b2"
33 Last-Modified: Thu, 07 Nov 2013 09:14:50 GMT
35 # void http\Message\Body::__construct([resource $stream = NULL])
37 Create a new message body, optionally referencing $stream.