<@U0F3291QE> current approach of extending `HttpCl...
# tornadofx
c
@edvin current approach of extending
HttpClientEngine
and overriding
reset
does not work, because
reset()
is called in the parent constructor. To make it work I have to initilize
Rest
like this:
Copy code
Rest.engineProvider = ::CustomHttpEngine
api.baseURI = "<https://example.com/api>"
api.reset()
IntelliJ is even warning about the fragility of calling an open method in parent constructor 🙂 Another problem - no way to get cookies from the response. I can easily implement it locally, but at this point I'll probably just wire in something like Spring's rest template, as I'm more interested in the UI part than fixing plumbing 🙂