http4k Connect is a lightweight API Client toolkit which includes libraries for connecting to popular third-party cloud
services and AI backends using http4k compatible APIs, along with Fake implementations for usage during local
testing. These are all underpinned by a variation on the
uniform Server as a Function model powered by the HttpHandler
interface
exposed by http4k, so you can:
- Take advantage of the simple and powerful SaaF model and APIs used in http4k.
- Plug everything together completely in-memory and take advantage of this powerful model.
- Have access to the underlying HTTP clients (and hence add metrics or logging).
- Run stateful Fake implementations of 3rd party systems locally or in test environments.
Although centered around usage in http4k-based projects, http4k-connect does not require this and the libraries are usable from any JVM application.
Rationale
Although convenient, many API Client libraries introduce many heavyweight dependencies or contain a plethora of non-required functionality, which can have a large effect on binary size. As an alternative, http4k-connect provides lightweight versions of popular APIs covering standard use-cases.
Installation
dependencies {
implementation(platform("org.http4k:http4k-connect-bom:5.23.0.0"))
implementation("org.http4k:http4k-connect-amazon-s3")
testImplementation("org.http4k:http4k-connect-amazon-s3-fake")
testImplementation("org.http4k:http4k-connect-storage-redis")
}
The main documentation has moved to the http4k Connect [site](https://connect.http4k.org)
Supported APIs and Fakes:
See the Module Reference for the complete list of supported services.
- [Example Template](./example) -> `"org.http4k:http4k-connect-example"` / `"org.http4k:http4k-connect-example-fake"`
Want to add a new API Client or Storage backend?
Read the guide.