Sha256: ea8795e52836283d0f0550795d2337edce63efe60f4014022c1d2717344f9cdc

Contents?: true

Size: 658 Bytes

Versions: 82

Compression:

Stored size: 658 Bytes

Contents

HAL.Views.ResponseHeaders = Backbone.View.extend({
  initialize: function(opts) {
    this.vent = opts.vent;
  },

  events: {
    'click .follow': 'followLink'
  },

  className: 'response-headers',

  followLink: function(e) {
    e.preventDefault();
    var $target = $(e.currentTarget);
    var uri = $target.attr('href');
    window.location.hash = uri;
  },

  render: function(e) {
    this.$el.html(this.template({
      status: {
        code: e.jqxhr.status,
        text: e.jqxhr.statusText
      },
      headers: HAL.parseHeaders(e.jqxhr.getAllResponseHeaders())
    }));
  },

  template: _.template($('#response-headers-template').html())
});

Version data entries

82 entries across 82 versions & 1 rubygems

Version Path
pact_broker-2.55.0 vendor/hal-browser/js/hal/views/response_headers.js
pact_broker-2.54.0 vendor/hal-browser/js/hal/views/response_headers.js