An open API service indexing awesome lists of open source software.

https://github.com/micmro/har-format-ts-declaration

TypeScript typing for HAR (HTTP Archive) 1.2
https://github.com/micmro/har-format-ts-declaration

har typescript typings

Last synced: 6 months ago
JSON representation

TypeScript typing for HAR (HTTP Archive) 1.2

Awesome Lists containing this project

README

          

# har-format-ts-declaration
[![npm version](https://img.shields.io/npm/v/@types/har-format.svg?style=flat-square)](https://www.npmjs.com/package/@types/har-format)

TypeScript definitions (aka typings) for the HAR (HTTP Archive) file format (version 1.2).

# Usage

## Installation
The typings are on NPM, so you can simply:
```
npm install --save @types/har-format
```

## Example usage
```Typescript
import { Har } from "har-format";

function getNonRedirectEntries(file: Har){
return file.log.entries.filter(e => !e.response.redirectURL);
}
```

Originally based on the HAR typings created for [PerfCascade](https://github.com/micmro/PerfCascade).

## Specs and resources
- [W3C HAR Spec](https://w3c.github.io/web-performance/specs/HAR/Overview.html)
- [HAR 1.2 Spec](http://www.softwareishard.com/blog/har-12-spec)