https://kotlinlang.org logo
Title
d

dave

10/06/2017, 11:35 AM
@utikeev can you debug the traffic and then reproduce with curl?
u

utikeev

10/06/2017, 12:03 PM
Oh, well. It seems like my bad, as I forgot to open connection for the URL I'm using.
d

dave

10/06/2017, 12:38 PM
which HTTP client are you using? You probably shouldn't be needing to open url connections unless you're writing an HTTP client!
u

utikeev

10/06/2017, 12:51 PM
Hm, if I use it object way like this:
<http://Fuel.post|Fuel.post>(url).[...]
it works without opening the connection.
Okay, not it works both ways I'm totally lost, because it seems to me as the code I had 2 hours ago not working in the same case 😅
n

napperley

10/07/2017, 1:35 AM
@utikeev - Sounds like Fuel isn't properly tested/mature. At this point I would recommend going with OkHttp (http://square.github.io/okhttp/). If you have used Vert.x before then the vertx-web-client (http://vertx.io/docs/vertx-web-client/kotlin/) is another good option with solid Kotlin support.
c

cedric

10/08/2017, 3:49 AM
Probably not worth pulling vert.x as a dependency for a simple HTTP call
n

napperley

10/08/2017, 5:00 AM
Cedric - True unless vertx-core is used in the project, or the project relies on a server side project written using Vert.x.