I just wanted to share a(nother) success story usi...
# http4k
f
I just wanted to share a(nother) success story using http4k. Recently we needed to create a service that stubs out some external dependencies in the equivalent of a dev environment. First considered using something like Wiremock for this, but then thought we could just use http4k for that, seeing as we are already using it for the services proper. Turned out to be just so easy and lovely. It gives us the following out of the box: • Choice of server backend; can just use SunHttp, but we settled on Apache server (minimal additional dependencies and production ready). • Easy way to return mocked responses; just use JSON format, or like we did, simply use a Pebble template to return the response. Fast and easy! • Easy way to mimic latency; just add some behaviour from the Chaos module and off we go. • Easy way to test; simply use hamkrest matchers in a Junit 5 spec, mixed in with some use of the new Approval Testing module. Bosh! • Easy way to run, deploy and starts quickly! K8s friendly. Again, http4k proves to be the go-to toolkit for us! 👏
👏 5