https://github.com/raphw/interceptable-http-client
A wrapper API for creating interceptable Java HttpClients
https://github.com/raphw/interceptable-http-client
Last synced: about 1 year ago
JSON representation
A wrapper API for creating interceptable Java HttpClients
- Host: GitHub
- URL: https://github.com/raphw/interceptable-http-client
- Owner: raphw
- License: apache-2.0
- Created: 2020-02-26T12:52:57.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-26T14:11:22.000Z (about 6 years ago)
- Last Synced: 2025-03-18T09:03:02.679Z (about 1 year ago)
- Language: Java
- Size: 16.6 KB
- Stars: 35
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Interception extension for Java's HttpClient
--------------------------------------------
This module adds a common feature of HTTP client implementations to Java 11's `java.net.http.HttpClient`:
- Adding request decorators, to for example add or modify request headers.
- Adding request interception, to for example collect request metrics.
The extension is straight-forward to use by simply replacing `HttpClient.builder()` by `InterceptableHttpClient.builder()`. The extended builder API is then capable of registering decorators and interceptors by the two additional build steps `addDecorator` and `addInterceptor`.