https://github.com/ansman/harbringer
HTTP Request logger and exporter.
https://github.com/ansman/harbringer
har http logging okhttp okhttp3
Last synced: 3 months ago
JSON representation
HTTP Request logger and exporter.
- Host: GitHub
- URL: https://github.com/ansman/harbringer
- Owner: ansman
- License: apache-2.0
- Created: 2025-05-03T17:00:12.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-06-06T00:22:49.000Z (4 months ago)
- Last Synced: 2025-06-09T00:37:36.143Z (4 months ago)
- Topics: har, http, logging, okhttp, okhttp3
- Language: HTML
- Homepage:
- Size: 1.31 MB
- Stars: 15
- Watchers: 1
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Harbringer
Harbringer is an HTTP request logger. It can store your network requests and let you inspect or export them.It supports OkHttp out of the box, but you can use it with any HTTP client.
To read more, please refer to the [documentation](https://harbringer.ansman.se/).
For the changelog, see the [releases page](https://github.com/ansman/harbringer/releases).
## Basic usage
```kotlin
val harbringer = Harbringer(
storage = FileSystemHarbringerStorage(storageDirectory.toPath()),
maxRequests = 1000, // 1000 requests
maxDiskSize = 100 * 1024 * 1024, // 100MB
maxAge = 2.days,
)val okHttpClient = OkHttpClient.Builder()
.addHarbringer(harbringer)
.build()outputFile.sink().use { sink ->
harbringer.exportTo(sink)
}
```For the full documentation see https://harbringer.ansman.se/
Setup
---
For detailed instructions, see the [getting-started](https://harbringer.ansman.se/latest/getting-started/) page.
```kotlin
dependencies {
implementation("se.ansman.harbringer:harbringer:0.1.0")
// If using okhttp
implementation("se.ansman.harbringer:harbringer-okhttp3:0.1.0")
}
```## License
This project is licensed under the Apache-2.0 license. See [LICENSE](LICENSE) for the full license.
```
Copyright 2025 Nicklas AnsmanLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```