You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
It has no explicit property definition, which means it is public, isn't it? But its usage is not specified in the ResponseInterface of the PSR-7.
My problem is, that the Response class creates files in my project folder. Their name is the same string which i used as $body before. I am wondering how to deal with it, because if i implement some specific code to deal with the stream afterwards it will most likely not be compatible with another PSR-7 implementation.
The text was updated successfully, but these errors were encountered:
If you are trying to pass a string value, your options are:
// Write to the stream after creating the response:$response = newResponse();
$response->getBody()->write($string);
// Create a stream first:$stream = newStream('php://temp');
$stream->write($string);
$response = newResponse($stream);
Or wait until 1.1.0, when #52 is added, and you can do this:
$response = StringResponse::html($html); // HTML contents$response = StringResponse::json($data); //JSON contents
In the Response class constructor, the stream property gets initialized:
It has no explicit property definition, which means it is public, isn't it? But its usage is not specified in the ResponseInterface of the PSR-7.
My problem is, that the Response class creates files in my project folder. Their name is the same string which i used as
$body
before. I am wondering how to deal with it, because if i implement some specific code to deal with the stream afterwards it will most likely not be compatible with another PSR-7 implementation.The text was updated successfully, but these errors were encountered: