public function __construct(Hal $hal, $headers = [], $prettyPrint = true) { parent::__construct($hal, 201, $headers, $prettyPrint); if (!$this->headers->has('Location') && null !== ($url = $hal->getUri())) { $this->headers->set('Location', $url); } }
public function __construct(Hal $hal, $status = 500, $headers = [], $prettyPrint = true) { parent::__construct($hal, $status, $headers, $prettyPrint); $this->headers->set('Content-Type', 'application/vnd.error+json'); }