by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ivan Sanchez
    @s4nchez
    It’s released on 3.94.0 (available on jcenter, on its way to maven central)
    Chris James
    @quii_twitter
    Lovely turnaround time :)
    Ivan Sanchez
    @s4nchez
    Incidentally, we tend to hang out in the http4k channel in the kotlin slack, so don’t be surprised if we take a while to respond here
    Chris James
    @quii_twitter
    Yeah i just didnt have slack setup for kotlin and i was being lazy, gitter is a bit slicker in that regard
    Tobi
    @ttheuer
    Heyo! Slack invite doesn't seem to work, so I ask here: Does http4k work with Kotlin/Native?
    David Denton
    @daviddenton
    @ttheuer GraalVM is supported out of the box for the ApacheServer or SunHttp backends (within the limits of Graal/Substrate), but we rely on quite a few of the JDK classes which aren't supplied by the Kotlin stdlib, so true multiplatform isn't available. See here for details: http4k/http4k#186
    Tobi
    @ttheuer
    Awww
    Thanks, though!
    David Denton
    @daviddenton
    np - we're missing DateTime IO abstractions (the latter is more important) to be able to offer this. TBH, I think this will be somewhat of a problem for the real takeup of true MultiPlatform Kotlin.
    Tobi
    @ttheuer
    Yeah, I feel like Kotlin/Native is more of a toy project, right now...
    David Denton
    @daviddenton
    I don't envy JB - proper DateTime APIs are a total nightmare to implement correctly... :)
    Tobi
    @ttheuer
    I bet!
    David Valenzuela
    @val171001
    Hi, I'm working on a simple server to handle webhook requests. On one of my routes uses POST to receive the data but the bodyString() method is not working. I get the error "Exception in thread "HTTP-worker-2" java.lang.NoSuchMethodError: kotlin.io.ByteStreamsKt.readBytes(Ljava/io/InputStream;)" Anyone have experience this before or have any idea on what could be causing this?
    Ivan Sanchez
    @s4nchez
    @val171001 which server backend are you using?
    David Valenzuela
    @val171001
    @s4nchez I'm using ApacheServer
    Ivan Sanchez
    @s4nchez
    @val171001 Hmm are you sure you have the Kotlin library available in your classmate at runtime?
    Also make sure the Kotlin version is compatible. It may be the case you’re on a version that’s just too old
    David Valenzuela
    @val171001
    @s4nchez I'm going to check that. Thanks
    Ivan Sanchez
    @s4nchez
    @val171001 incidentally, if you’re on the Kotlin Lang slack, feel free to ask in the #http4k channel there as there are more people helping each other there
    David Valenzuela
    @val171001
    I tried to join, but as i read here seems that the invite is not working
    David Denton
    @daviddenton
    @val171001 if you DM me your email I'll try to send you an invite from inside the slack
    Pratik Chaudhary
    @abs-zero
    How do I write a doc (contract route) for multlipart data?
    David Denton
    @daviddenton
    @abs-zero it's standardised but you can find an exact example in the http4k source code - look for ContractRendererContract.kt
    Laurence Gonsalves
    @xenomachina
    Is there a recommended way to get the Body of a Response, but decompressed if necessary?
    Ivan Sanchez
    @s4nchez
    @xenomachina use the Gzip filter. It’ll will decompress the response body if the correct header is present.
    Laurence Gonsalves
    @xenomachina
    @s4nchez Thanks!
    lr9040
    @lr9040_twitter
    is there any chances http4k able to use Gradle watch package and auto rebuild ?
    also we forced to use Jetty at the moment as netty is terribly falling behind and returning socket error, will future releases of http4k includes kotlinx or any.. seeing the website can't really see any upcoming milestones any one can shade some lights on that ?
    Ivan Sanchez
    @s4nchez
    @lr9040_twitter for grade you mean in the http4k project or your project? There shouldn’t be any restriction for using it in your project...
    lr9040
    @lr9040_twitter
    in http4k project
    I do know that template rendering has hot-reload
    just curious on the possibility of having auto reload on . kt files updates
    Ivan Sanchez
    @s4nchez
    Re: jetty we support other backends. Undertow is pretty solid and have seen used in production in various clients. We also support ktor-server if you prefer something Kotlin based
    I’m a bit confused about the auto reload use case you’re after. Can you give a concrete example of the behaviour you’d like to see?
    lr9040
    @lr9040_twitter
    yes sure
    Ivan Sanchez
    @s4nchez
    Is that a thing for development or for production?
    lr9040
    @lr9040_twitter
    for production
    part of our api uses http4k, is there a possibility to achieve kind similar to vertx launcher does for re-deploy
    Ivan Sanchez
    @s4nchez
    But how does one change just some files of the project in production? Sorry, I’m so used to immutable packages/deployments that this use case feels very foreign to me
    I’m curious how you’d plan this kind of re-deployment
    lr9040
    @lr9040_twitter

    ./gradlew web:vertxRun

    Task :web:vertxRun
    2020-04-13 00:56:23,927 [main] INFO i.v.c.impl.launcher.commands.Watcher - Watched paths: [/Users/lr9040/IdeaProjects/api/web/src]
    2020-04-13 00:56:23,932 [main] INFO i.v.c.impl.launcher.commands.Watcher - Starting the vert.x application in redeploy mode
    Starting vert.x application...
    d97bac62-c3ec-4ca4-a703-b42487c342b7-redeploy
    2020-04-13 00:56:24,925 [vert.x-eventloop-thread-0] INFO app - api.service.App is ready!
    2020-04-13 00:56:44,078 [Thread-1] INFO i.v.c.impl.launcher.commands.Watcher - Redeploying!
    Stopping vert.x application 'd97bac62-c3ec-4ca4-a703-b42487c342b7-redeploy'
    Application 'd97bac62-c3ec-4ca4-a703-b42487c342b7-redeploy' terminated with status 0
    Starting a Gradle Daemon, 1 busy and 1 incompatible Daemons could not be reused, use --status for details
    Task :common:compileKotlin UP-TO-DATE
    Task :common:compileJava NO-SOURCE
    Task :common:processResources NO-SOURCE
    Task :common:classes UP-TO-DATE
    Task :common:inspectClassesForKotlinIC UP-TO-DATE
    Task :common:jar UP-TO-DATE
    Task :web:compileKotlin UP-TO-DATE
    Task :web:compileJava NO-SOURCE
    Task :web:processResources UP-TO-DATE
    Task :web:classes UP-TO-DATE

    BUILD SUCCESSFUL in 7s
    5 actionable tasks: 5 up-to-date
    2020-04-13 00:56:52,789 [Thread-1] INFO i.v.c.impl.launcher.commands.Watcher - User command terminated with status 0
    Starting vert.x application...
    d97bac62-c3ec-4ca4-a703-b42487c342b7-redeploy
    2020-04-13 00:56:52,807 [Thread-1] INFO i.v.c.impl.launcher.commands.Watcher - Redeployment done in 8729 ms.
    2020-04-13 00:56:53,746 [vert.x-eventloop-thread-0] INFO app - api.service.App is ready!
    <===========--> 90% EXECUTING [41s]

    :web:vertxRun

    pretty long log thought it might helps you..
    Ivan Sanchez
    @s4nchez
    Ah! Gotcha... you run grade in prod. Then re-deploy means simply updating the project files?
    lr9040
    @lr9040_twitter
    correct
    we just trying to accomplish the re-deployment upon files changes within project files.. is there a possibility to achieve this with http4k since it's running asServer ?
    Ivan Sanchez
    @s4nchez
    I’m not sure if that reload model fits in http4k design. Needs some exploration, which unfortunately I don’t have the bandwidth to do at the moment :(
    lr9040
    @lr9040_twitter
    seeing the website can't really see any upcoming milestones any lights on that ?
    lr9040
    @lr9040_twitter
    👍