<@UK9L4Q4FP> the latest version (3.260.0) also int...
# http4k
d
@James Richardson the latest version (3.260.0) also introduced a couple improvements to the interop when creating apps/manipulate http4k APIs from Java code. Here's a couple of examples in Java:
Copy code
Uri hello = Uri.of("hello");
    Request request = Request.Companion.create(Method.GET, "").body(Body.EMPTY);
    Response response = Response.Companion.create(ACCEPTED).body(Body.create("hello"));
    Function1<Request, Response> httpHandler = req -> response;
    Filter filter = Filter.create(next -> req -> next.invoke(request.header("foo", "bar")));
    Function1<Request, Response> decorated = then(filter, then(filter, httpHandler));
    Function1<Request, Response> apache = ApacheClient.create();
    ServerConfig undertow = new Undertow(8000);
It's not our focus, and we're not intending on extending it, just smoothing off a couple of the roughest edges. 🙂. In the case of
Request.Companion.create
above - there is an outstanding Kotlin bug which currently prevents us getting rid of the
Companion
just yet - but we will do it eventually.
👍 1