https://kotlinlang.org logo
Title
d

dave

06/21/2017, 8:01 PM
@tipsy if you had at least a URI object, so you can move port/host/path/queries onto it
t

tipsy

06/21/2017, 8:05 PM
dave: would that be a good abstraction? i thought i should limit the abstraction to response/request, since that's all i'm getting from the servlet 🤔
d

dave

06/21/2017, 8:13 PM
Well by tightening the abstraction, you make the API clearer. For instance, if you have a method called header() on the context, is that referring to the request or response?
I personally find using the IDE autocomplete for API guidance instead of java doc much easier
t

tipsy

06/21/2017, 8:26 PM
if you have a method called header() on the context, is that referring to the request or response?
header/cookie methods is the main reason i want to create response/request inside of context
i thought port/host/path etc could stay in context (or in request), creating
URL
would make where it belongs less clear i think
d

dave

06/21/2017, 8:50 PM
Agreed. Req/resp first would be clearest and then url on request should it need breaking down further.
t

tipsy

06/21/2017, 8:59 PM
http4k looks neat btw, nice work
😃 1