class Inferno::Entities::Header

A `Header` represents an HTTP request/response header

@attr_accessor [String] id of the header @attr_accessor [String] request_id index of the HTTP request @attr_accessor [String] name header name @attr_accessor [String] value header value @attr_accessor [String] type request/response @attr_accessor [Time] created_at @attr_accessor [Time] updated_at

Constants

ATTRIBUTES

Public Class Methods

new(params) click to toggle source
Calls superclass method Inferno::Entities::Entity::new
# File lib/inferno/entities/header.rb, line 17
def initialize(params)
  super(params, ATTRIBUTES)
end

Public Instance Methods

request?() click to toggle source
# File lib/inferno/entities/header.rb, line 21
def request?
  type == 'request'
end
response?() click to toggle source
# File lib/inferno/entities/header.rb, line 25
def response?
  type == 'response'
end
to_hash() click to toggle source
# File lib/inferno/entities/header.rb, line 29
def to_hash
  {
    id: id,
    request_id: request_id,
    type: type,
    name: name,
    value: value,
    created_at: created_at,
    updated_at: updated_at
  }.compact
end