<commit_before>'use strict';

module.exports = function(app) {
	app.factory('httpService', function($http, $location) {

		// Generic helper function
		var http = function(method, params) {

			params.id = params.id || '';

			var promise = $http[method]('/api/0_0_1/data/' + params.id, params.data)
			.error(function(error, status) {

				console.log('Error in http ' + method + ': ' + error + ' | status ' + status);
				if (status === 401) {
					$location.path('/signin');
				}

			});

			return promise;
		};

		// Specific verbs
		var httpVerbs = {

			get: function() {
				return http('get', {});
			},

			post: function(data) {
				console.log('data: ' + JSON.stringify(data));
				return http('post', {
					data: data
				});
			},

			put: function(data) {
				return http('put', {<commit_msg>Remove unwanted commenting :(<commit_after>'use strict';

module.exports = function(app) {
	app.factory('httpService', function($http, $location) {

		// Generic helper function
		var http = function(method, params) {

			params.id = params.id || '';

			var promise = $http[method]('/api/0_0_1/data/' + params.id, params.data)
			.error(function(error, status) {

				console.log('Error in http ' + method + ': ' + error + ' | status ' + status);
				if (status === 401) {
					$location.path('/signin');
				}

			});

			return promise;
		};

		// Specific verbs
		var httpVerbs = {

			get: function() {
				return http('get', {});
			},

			post: function(data) {
				return http('post', {
					data: data
				});
			},

			put: function(data) {
				return http('put', {
{'fraction_non_alphanumeric': 0.18371212121212122, 'fraction_numerical': 0.007575757575757576, 'mean_word_length': 2.8100961538461537, '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': '1977650', 'n_tokens_mistral': 654, 'n_tokens_neox': 509, 'n_words': 113}