slimphp / Slim-Skeleton

Slim Framework 4 Skeleton Application
http://www.slimframework.com
MIT License
1.59k stars 479 forks source link

Use the code passed to ActionPayload for the HTTP status code #158

Closed yakubenko closed 4 years ago

yakubenko commented 4 years ago

Currently when we pass a status code to the constructor of the ActionPayload class it is only used as a field in our json response. If we don't provide an error to the constructor, the HTTP code is always 200. It doesn't work for all scenarios. In some cases I would return the code 202 and provide information on when the action will be fully completed.