<commit_before>export default class JsonResponseMiddleware {

	setConfigValues() {
		return { isRawResponse: true };
	}

	getContentType(next) {
		return next() || 'application/json';
	}

	getResponseData(next) {
		return next().then(data => JSON.stringify(data));
	}
}
<commit_msg>Override default Content-Type in JSON response middleware (#747)<commit_after>export default class JsonResponseMiddleware {

	setConfigValues() {
		return { isRawResponse: true };
	}

	getContentType() {
		return 'application/json';
	}

	getResponseData(next) {
		return next().then(data => JSON.stringify(data));
	}
}

{'fraction_non_alphanumeric': 0.13311148086522462, 'fraction_numerical': 0.004991680532445923, 'mean_word_length': 5.08080808080808, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3520214', 'n_tokens_mistral': 199, 'n_tokens_neox': 185, 'n_words': 38}