createStreamFromResource($handle); $h = new Headers(); foreach ($headers as $name => $value) { $h->addHeader($name, $value); } return new SlimRequest( $method, $uri, $h, $cookies, $serverParams, $stream ); } }