Ready! API HAR library

Contains HAR models and writers

License

License

Categories

Categories

Java Languages
GroupId

GroupId

com.smartbear
ArtifactId

ArtifactId

har-java
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Ready! API HAR library
Contains HAR models and writers
Project URL

Project URL

https://github.com/SmartBear/har-java
Source Code Management

Source Code Management

https://github.com/SmartBear/har-java

Download har-java

How to add to project

<!-- https://jarcasting.com/artifacts/com.smartbear/har-java/ -->
<dependency>
    <groupId>com.smartbear</groupId>
    <artifactId>har-java</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.smartbear/har-java/
implementation 'com.smartbear:har-java:1.0.0'
// https://jarcasting.com/artifacts/com.smartbear/har-java/
implementation ("com.smartbear:har-java:1.0.0")
'com.smartbear:har-java:jar:1.0.0'
<dependency org="com.smartbear" name="har-java" rev="1.0.0">
  <artifact name="har-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.smartbear', module='har-java', version='1.0.0')
)
libraryDependencies += "com.smartbear" % "har-java" % "1.0.0"
[com.smartbear/har-java "1.0.0"]

Dependencies

compile (4)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-core jar 2.6.0
com.fasterxml.jackson.core : jackson-annotations jar 2.6.0
com.fasterxml.jackson.core : jackson-databind jar 2.6.0
org.apache.commons : commons-lang3 jar 3.4

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

HAR Java

A convenient java library for writing and reading HAR

Usage

HarStreamWriter allows to append entries over time. Once no more entry needs to be added closeHar() needs to be called explicitly.

// Create HarStreamWriter if you want to append entries over time
HarStreamWriter harWriter = new DefaultHarStreamWriter.Builder().withOutputFile(new File("log.har")).withUsePrettyPrint(true).build();

// Create the entry model with request/response and other mandatory fields
HarRequest harRequest = new HarRequestBuilder().withMethod("GET").withUrl("http://smartbear/resource").withHttpVersion("HTTP/1.1").build();
HarResponse harResponse = new HarResponseBuilder().build();

// Add the entry
harWriter.addEntry(new HarEntryBuilder().withRequest(harRequest).withResponse(harResponse).build());

// finally close the HAR
harWriter.closeHar();
com.smartbear

SmartBear Software

Think Bigger. Build Smarter.

Versions

Version
1.0.0