<commit_before>var cookie = require("cookie"),
	decode = require("querystring/decode");

/**
 * This class implements the Triton Request API for client-side transitions.
 */
class ClientRequest {

	constructor(url) {
		this._url = url;
	}

	setRoute(route) {
		this._route = route;
	}

	getUrl() {
		return this._url;
	}

	getQuery() {
		var indexOfQuestion = this._url.indexOf("?");
		if (-1 === indexOfQuestion) {
			return {};
		}
		return decode(this._url.substring(indexOfQuestion + 1));
	}

	getRouteParams() {
		return this._route.params;
	}

	getMethod() {
		// I believe that client-side transitions should always be
		// HTTP GETs -sra.
		return "get";
	}

	getRouteName() {
		return this._route.name;
	}

	getHttpHeader(name, callback) {
		// this is a no-op; there are no HTTP headers on the client-side.
	}

	getHttpHeaders(callback) {
		// this is a no-op; there are no HTTP headers on the client-side.
	}

	getCookie(name) {
		return this.getCookies()[name];
	}

	getCookies() {

		return cookie.parse(document.cookie);
	}

	getBody() {
		console.error("ClientRequest.getBody not implemented.");<commit_msg>ClientRequest<commit_after>var cookie = require("cookie"),
	decode = require("querystring/decode");

/**
 * This class implements the Triton Request API for client-side transitions.
 */
class ClientRequest {

	constructor(url) {
		this._url = url;
	}

	setRoute(route) {
		this._route = route;
	}

	getUrl() {
		return this._url;
	}

	getQuery() {
		var indexOfQuestion = this._url.indexOf("?");
		if (-1 === indexOfQuestion) {
			return {};
		}
		return decode(this._url.substring(indexOfQuestion + 1));
	}

	getRouteParams() {
		return this._route.params;
	}

	getMethod() {
		// I believe that client-side transitions should always be
		// HTTP GETs -sra.
		return "get";
	}

	getRouteName() {
		return this._route.name;
	}
	/*eslint-disable no-unused-vars */
	getHttpHeader(name, callback) {
		// this is a no-op; there are no HTTP headers on the client-side.
	}

	getHttpHeaders(callback) {
		// this is a no-op; there are no HTTP headers on the client-side.
	}
	/*eslint-enable no-unused-vars */
	getCookie(name) {
		return this.getCookies()[name];
	}

	getCookies() {

		return cookie.parse(document.cookie);
	}

	getBody() {
		console.error("ClientRequest.getBody not implemented.");
{'fraction_non_alphanumeric': 0.14094249891915261, 'fraction_numerical': 0.0017293558149589277, 'mean_word_length': 3.458574181117534, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4400729', 'n_tokens_mistral': 836, 'n_tokens_neox': 767, 'n_words': 191}