page-cache icon indicating copy to clipboard operation
page-cache copied to clipboard

Add application/vnd.api+json support so files are saved as .json file

Open ssglopes opened this issue 2 years ago • 0 comments

Hi, Would it be possible to add contentType: application/vnd.api+json so this package would be compatible with https://laraveljsonapi.io/ as that package expects application/vnd.api+json

    protected function guessFileExtension($response)
    {
        $contentType = $response->headers->get('Content-Type');

        if ($response instanceof JsonResponse ||
            $contentType == 'application/json' ||
            $contentType == 'application/vnd.api+json' // <= would it be possible to add this line 
        ) {
            return 'json';
        }

ssglopes avatar Feb 13 '24 17:02 ssglopes