Sha256: 959903e431555e7cad3dcc9611fefa685b4691b7a2ac5789a5607707e5818de5

Contents?: true

Size: 583 Bytes

Versions: 10

Compression:

Stored size: 583 Bytes

Contents

//= require json2

AmCharts.RB.Ajax.Response = function(transport) {
  var $transport = transport;

  return {
    status: function() { return $transport.status },
    status_text: function() { return $transport.statusText },
    ready_state: function() { return $transport.readyState },

    get_header: function(name)
    {
      try {
        return $transport.getResponseHeader(name) || null;
      } catch (e) { return null; }
    },

    get_json: function()
    {
      try {
        return JSON.parse($transport.responseText);
      } catch(e) { return null; }
    }
  }
};

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
amcharts.rb-3.11.2.17 app/assets/javascripts/amcharts/ajax/response.js
amcharts.rb-3.11.2.16 app/assets/javascripts/amcharts/ajax/response.js
amcharts.rb-3.11.2.14 app/assets/javascripts/amcharts/ajax/response.js
amcharts.rb-3.11.1.14 app/assets/javascripts/amcharts/ajax/response.js
amcharts.rb-3.4.8.0 app/assets/javascripts/amcharts/ajax/response.js
amcharts.rb-3.4.7.5 app/assets/javascripts/amcharts/ajax/response.js
amcharts.rb-3.4.7.4 app/assets/javascripts/amcharts/ajax/response.js
amcharts.rb-3.4.7.3 app/assets/javascripts/amcharts/ajax/response.js
amcharts.rb-3.4.7.2 app/assets/javascripts/amcharts/ajax/response.js
amcharts.rb-3.4.7.1 app/assets/javascripts/amcharts/ajax/response.js