I’ve started to build an API using the slim-skeleton app and everything works great.
Now I want to respond with a file instead of JSON, but I don’t have a clue how to integrate / use the slim-http response decorator in order to use $response->withFileDownload(…)
UPDATE (RESOLUTION)
- included
slim/http
package (through composer) and the response type is already changed intoSlim\Http\Response
- changed the Response object in all Actions, from
use Psr\Http\Message\ResponseInterface as Response
touse Slim\Http\Response
Now I have decorators !