I am using OkHttp and try to create a proxy for a ...
# javalin
a
I am using OkHttp and try to create a proxy for a project. What I want is to use the result with
InputStream
as response. But I have to close the client also at one point.
Copy code
val response = client.execute(httpGet)
if (response.entity != null) {
    callContext.result(response.entity.content)
}
client.close()
I think sending the data is handled in a separate thread and resulting in an error when the client closes