How to use the hint/dist/src/lib/utils/content-type.getContentTypeData function in hint

To help you get started, we’ve selected a few hint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webhintio / hint / packages / utils-debugging-protocol-common / src / debugging-protocol-connector.ts View on Github external
const response: Response = {
            body: {
                content,
                rawContent,
                rawResponse
            },
            charset: null,
            headers: resourceHeaders,
            hops,
            mediaType: null,
            statusCode: cdpResponse.response.status,
            url: resourceUrl
        };

        const { charset, mediaType } = getContentTypeData(element, resourceUrl, response.headers, response.body.rawContent);

        response.mediaType = mediaType;
        response.charset = charset;

        return response;
    }