<?php
namespace IntellexApps\PHP\UploadFile\Network;

class JsonResponse extends Response
{

    /**
     * Set json headers
     */
    protected function additionalHeaders()
    {
        $this->header('Content-Type: application/json');
    }

    /**
     * Convert to json before sending to client
     *
     * @return string
     */
    protected function getBody()
    {
        return json_encode($this->getContent());
    }
}