This repository was archived by the owner on Jan 29, 2020. It is now read-only.
Diactoros 1.1.0
Added
-
#52, #58, #59, and #61 create several custom response types for simplifying response creation:
Zend\Diactoros\Response\HtmlResponseaccepts HTML content via its constructor, and sets theContent-Typetotext/html.Zend\Diactoros\Response\JsonResponseaccepts data to serialize to JSON via its constructor, and sets theContent-Typetoapplication/json.Zend\Diactoros\Response\EmptyResponseallows creating empty, read-only responses, with a default status code of 204.Zend\Diactoros\Response\RedirectResponseallows specifying a URI for theLocationheader in the constructor, with a default status code of 302.
Each also accepts an optional status code, and optional headers (which can also be used to provide an alternate
Content-Typein the case of the HTML and JSON responses).
Deprecated
- Nothing.
Removed
- #43 removed both
ServerRequestFactory::marshalUri()andServerRequestFactory::marshalHostAndPort(), which were deprecated prior to the 1.0 release.