<commit_before>/**
* REST Webservice is a jQuery plugin that allows you to easily send get, post, put and delete requests to a REST API.
* \version 1.0
* \author <NAME>
* \copyright (c) 2012 <NAME>
* Dual licensed under the MIT and GPL licenses.
* MIT License: https://github.com/adrazich/rest-webservice-jquery/blob/master/MIT-License.txt
* GPL License: https://github.com/adrazich/rest-webservice-jquery/blob/master/GPL-License.txt
* Github: https://github.com/adrazich/rest-webservice-jquery
*/
;(function($, window, document, undefined){
  
  var methods = {
    init: function(){
    },
    get: function(url, data, callback){
      return methods.request('get', url, data, callback);
    },
    post: function(url, data, callback){
      return methods.request('post', url, data, callback);
    },
    put: function(url, data, callback){
      return methods.request('put', url, data, callback);
    },
    del: function(url, data, callback){
      return methods.request('del', url, data, callback);
    },
    request: function(type, url, data, callback){
      if (!/get|post|put|del/.test(type)) return false;
      data = (data === undefined || data === null) ? '' : data;
	  var useCache = $.browser.msie ? false : true;
  
      $.ajax({
        type: type,
        url: url,
        data: data,
        dataType: 'json',
        cache: useCache,
        complete: function(response){
          callback($.parseJSON(response.responseText));
        }
      });
      
      return true;
    }
  };
  
  $.webservice = function(method){
    if (methods[method]){<commit_msg>Updated the ajax call to handle the new del update properly<commit_after>/**
* REST Webservice is a jQuery plugin that allows you to easily send get, post, put and delete requests to a REST API.
* \version 1.0
* \author <NAME>
* \copyright (c) 2012 <NAME>
* Dual licensed under the MIT and GPL licenses.
* MIT License: https://github.com/adrazich/rest-webservice-jquery/blob/master/MIT-License.txt
* GPL License: https://github.com/adrazich/rest-webservice-jquery/blob/master/GPL-License.txt
* Github: https://github.com/adrazich/rest-webservice-jquery
*/
;(function($, window, document, undefined){
  
  var methods = {
    init: function(){
    },
    get: function(url, data, callback){
      return methods.request('get', url, data, callback);
    },
    post: function(url, data, callback){
      return methods.request('post', url, data, callback);
    },
    put: function(url, data, callback){
      return methods.request('put', url, data, callback);
    },
    del: function(url, data, callback){
      return methods.request('del', url, data, callback);
    },
    request: function(type, url, data, callback){
      if (!/get|post|put|del/.test(type)) return false;
      type = type == 'del' ? 'delete' : type;
      data = (data === undefined || data === null) ? '' : data;
	  var useCache = $.browser.msie ? false : true;
  
      $.ajax({
        type: type,
        url: url,
        data: data,
        dataType: 'json',
        cache: useCache,
        complete: function(response){
          callback($.parseJSON(response.responseText));
        }
      });
      
      return true;
    }
  };
  
  $.webservice = function(method){
    if (methods[method]){
{'fraction_non_alphanumeric': 0.15073529411764705, 'fraction_numerical': 0.003676470588235294, 'mean_word_length': 2.859338061465721, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '3735935', 'n_tokens_mistral': 1002, 'n_tokens_neox': 978, 'n_words': 276}