Skip to content

Latest commit

History

101 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

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 timeHarStreamWriterharWriter = newDefaultHarStreamWriter.Builder().withOutputFile(newFile("log.har")).withUsePrettyPrint(true).build();
// Create the entry model with request/response and other mandatory fieldsHarRequestharRequest = newHarRequestBuilder().withMethod("GET").withUrl("http://smartbear/resource").withHttpVersion("HTTP/1.1").build();
HarResponseharResponse = newHarResponseBuilder().build();
// Add the entryharWriter.addEntry(newHarEntryBuilder().withRequest(harRequest).withResponse(harResponse).build());
// finally close the HARharWriter.closeHar();

About

A Java library to read from har format and to write in har format

Resources

Stars

10 stars

Watchers

13 watching

Forks

Releases

Packages

Used by

Contributors

Languages