added short example
This commit is contained in:
parent
a2a028deb7
commit
f865c8cb4a
|
|
@ -16,3 +16,23 @@ twitterdescription:
|
|||
Create [HAR](http://www.softwareishard.com/blog/har-12-spec/) files based on [Chrome Debugging Protocol](https://developer.chrome.com/devtools/docs/debugger-protocol) data.
|
||||
|
||||
Code originally extracted from [Browsertime](https://github.com/sitespeedio/browsertime), initial implementation inspired by [Chromedriver_har](https://github.com/woodsaj/chromedriver_har).
|
||||
|
||||
|
||||
## Introduction
|
||||
|
||||
Chrome-HAR is for tool makers: Get the log from the Chrome Debugging Protocol and use Chrome-HAR to parse it to a HAR.
|
||||
|
||||
## Example
|
||||
|
||||
Convert your messages to a HAR file.
|
||||
|
||||
~~~
|
||||
const parser = require('chrome-har');
|
||||
|
||||
// you already have the message from Chrome Debugging Protocol
|
||||
|
||||
parser.harFromMessages(messages))
|
||||
.then(har => {
|
||||
// do whatever you want with the HAR file
|
||||
})
|
||||
~~~
|
||||
|
|
|
|||
Loading…
Reference in New Issue