https://github.com/jangorman/harparser
A Swift .har parser
https://github.com/jangorman/harparser
har swift swift-4 swift-package swift-package-manager
Last synced: about 1 month ago
JSON representation
A Swift .har parser
- Host: GitHub
- URL: https://github.com/jangorman/harparser
- Owner: JanGorman
- License: mit
- Created: 2017-11-10T16:13:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-10-01T15:06:28.000Z (almost 7 years ago)
- Last Synced: 2025-01-05T12:12:51.614Z (over 1 year ago)
- Topics: har, swift, swift-4, swift-package, swift-package-manager
- Language: Swift
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# HARParser
[](https://travis-ci.org/JanGorman/HARParser)
[](https://swift.org/package-manager)
A parser for [.har](https://en.wikipedia.org/wiki/.har) files. To use it in you project add the dependency to your `Package.swift` file:
```swift
import PackageDescription
let package = Package(
name: "My awesome CLI tool"
dependencies: [
.package(
url: "https://github.com/JanGorman/HARParser",
from: "1.0.0"
)
]
)
```
## Usage
Initialise an instance of the parser with the contents of a .har file as [Data](https://developer.apple.com/documentation/foundation/data):
```swift
import HARParser
func parse() throws {
let data = Data() // Load the file into memory
let parser = HARParser(data: data)
// After parsing you can access the different fields of the archive
let har = try parser.parse()
}
```
## Licence
Table is released under the MIT license. See LICENSE for details.