class HAR::Log

Overview

This object represents the root of exported data.

There is one Page object for every exported web page and one Entry object for every HTTP request. In case when an HTTP trace tool isn't able to group requests by a page, the Log#pages array is empty and individual requests doesn't have a parent page.

Included Modules

Defined in:

har/log.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(version : String = "1.2", creator : HAR::Creator = Creator.new, browser : Nil | HAR::Browser = Browser.new, entries : Array(HAR::Entry) = Array(Entry).new, pages : Nil | Array(HAR::Page) = nil, comment : Nil | String = nil) #

[View source]

Instance Method Detail

def browser : Browser | Nil #

Name and version info of used browser.


[View source]
def browser=(browser : Browser | Nil) #

Name and version info of used browser.


[View source]
def comment : String | Nil #

A comment provided by the user or the application.


[View source]
def comment=(comment : String | Nil) #

A comment provided by the user or the application.


[View source]
def creator : Creator #

Name and version info of the log creator application.


[View source]
def creator=(creator : Creator) #

Name and version info of the log creator application.


[View source]
def entries : Array(Entry) #

This object represents an array with all exported (tracked) HTTP requests. Sorting entries by Entry#started_date_time (starting from the oldest) is preferred way how to export data since it can make importing faster. However the reader application should always make sure the array is sorted (if required for the import).


[View source]
def entries=(entries : Array(Entry)) #

This object represents an array with all exported (tracked) HTTP requests. Sorting entries by Entry#started_date_time (starting from the oldest) is preferred way how to export data since it can make importing faster. However the reader application should always make sure the array is sorted (if required for the import).


[View source]
def pages : Array(Page) | Nil #

List of all exported (tracked) pages. Leave out this field if the application does not support grouping by pages.


[View source]
def pages=(pages : Array(Page) | Nil) #

List of all exported (tracked) pages. Leave out this field if the application does not support grouping by pages.


[View source]
def version : String #

Version number of the format. If empty, string "1.1" is assumed by default.


[View source]
def version=(version : String) #

Version number of the format. If empty, string "1.1" is assumed by default.


[View source]