8000 GitHub - jacklotusho/har-reader: Library for accessing HTTP Archives (HAR) with Java
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Library for accessing HTTP Archives (HAR) with Java

License

Notifications You must be signed in to change notification settings

jacklotusho/har-reader

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HAR reader

Read HTTP Archives with Java.

<dependency>
  <groupId>de.sstoehr</groupId>
  <artifactId>har-reader</artifactId>
  <version>2.0.0</version>
</dependency>

Build Status Coverage Status Maven Central

Usage

Reading HAR from File:

HarReader harReader = new HarReader();
Har har = harReader.readFromFile(new File("myhar.har"));
System.out.println(har.getLog().getCreator().getName());

Reading HAR from String:

HarReader harReader = new HarReader();
Har har = harReader.readFromString("{ ... HAR-JSON-Data ... }");

Migrating from 1.* to 2.0

HarReader can't be called statically anymore. Please create your own HarReader instance:

  • HarReader.fromFile() should be harReader.readFromFile()
  • HarReader.fromString() should be harReader.readFromString()

HarReader should be thread-safe (when using the DefaultMapperFactory).

In old versions HarReader threw IllegalArgumentExceptions when the HAR contained null values, although the spec stated, that this field is not optional. This behaviour was changed. HarReader does not check, whether required fields are not null. To allow easier read access, HarReader will return "empty" objects and lists wherever possible.

About

Library for accessing HTTP Archives (HAR) with Java

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%
0