<commit_before>'use strict';
var app = angular.module('app', []);
app.config(function($httpProvider){
  delete $httpProvider.defaults.headers.common['X-Requested-With'];
});

app.controller('ctrl', function($http) {
  var ctrl = this;
  ctrl.acronyms = [];
  ctrl.shout = function() {
      console.log(ctrl.input.des);
  }

  ctrl.acronize = function() {
    ctrl.acronyms.push(ctrl.input.acronym);
    ctrl.input.acronym='';
    ctrl.input.des='';
  }

  var URL = '/foo';

  ctrl.sendObject = function() {
    var acronym = ctrl.input.acronym;
    var description = ctrl.input.des;
    if(!(acronym&&description)) {
      console.log('NO acronym or description');
    }
    else {
      var acronymObject = {'acronym': acronym, 'description': description}
      console.log(acronymObject);
      $http.post(URL, acronymObject).success(function(data) {
         ctrl.acronyms = data.strings;
      }).error(function(){
        console.log('ERROR');
      });
    }
  }
});<commit_msg>connected to Azure<commit_after>'use strict';
var app = angular.module('app', []);
app.config(function($httpProvider){
  delete $httpProvider.defaults.headers.common['X-Requested-With'];
});

app.controller('ctrl', function($http) {
  var ctrl = this;
  ctrl.acronyms = [];
  ctrl.shout = function() {
      console.log(ctrl.input.des);
  }

  ctrl.acronize = function() {
    ctrl.acronyms.push(ctrl.input.acronym);
    ctrl.input.acronym='';
    ctrl.input.des='';
  }

  var URL = 'http://acronator.azurewebsites.net/api/test';

  ctrl.sendObject = function() {
    var acronym = ctrl.input.acronym;
    var description = ctrl.input.des;
    if(!(acronym&&description)) {
      console.log('NO acronym or description');
    }
    else {
      var acronymObject = {'acronym': acronym, 'description': description}
      console.log(acronymObject);
      $http.post(URL, acronymObject).success(function(data) {
        ctrl.acronyms.push(data);
        //ctrl.acronyms = data.strings;
      }).error(function(){
        console.log('ERROR');
      });
    }
  }
});
{'fraction_non_alphanumeric': 0.17406143344709898, 'fraction_numerical': 0.0, 'mean_word_length': 3.2049180327868854, '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': '429638', 'n_tokens_mistral': 702, 'n_tokens_neox': 694, 'n_words': 107}