Created
Less than 1 minute
Created
HTTP 201 Created response class.
class Created extends \Hazaar\Controller\Response\HTTP\ResponseThis response indicates that the request has been fulfilled, resulting in the creation of a new resource. The response may include an optional content body and a default content type of text/html.
Methods
__construct
Constructs the HTTP 201 Created response.
public __construct(?string $content, string $contentType = 'text/html'): voidThis constructor initializes the response with a status code of 201 and sets the content type and optional content body.
Parameters
| Parameter | Type | Description |
|---|---|---|
$content | string | the optional content body of the response |
$contentType | string | The content type of the response. Defaults to text/html. |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:24 +0000