Thread
#multiplatform
    t

    Tristan Blakers

    1 year ago
    does anyone know of a multiplatform URL representation, with basic parsing capability? Ktor has one, but it's too heavy to drag into the browser for just one class...
    e

    edenman

    1 year ago
    but really depends on what you need
    t

    Tristan Blakers

    1 year ago
    that has the right feature-set, but it seems to be JVM only?
    e

    edenman

    1 year ago
    ah yeah, sorry. i include the dep in my
    androidMain
    , didn’t notice that part
    b

    Benjamin Charais

    1 year ago
    As far as existing libraries, Ktor is really what we have for common. Though, I don’t think that building a simple wrapper with expect/actual would be a huge deal.
    t

    Tristan Blakers

    1 year ago
    yeah I was thinking of pulling the KTor url class out into its own package with expect/actual - was hoping someone else had bumped into this already 🙂
    b

    Benjamin Charais

    1 year ago
    What platforms are you targeting?
    t

    Tristan Blakers

    1 year ago
    JVM and JS
    b

    Benjamin Charais

    1 year ago
    I assume you really just need stuff like…. and this is probably way more than needed
    t

    Tristan Blakers

    1 year ago
    that's it - really just the ability to represent a URL, and parse one from a String
    *represent the components of a URL
    b

    Benjamin Charais

    1 year ago
    I think that relying on actuals without external libs will be your easiest fastest implementation
    Sadly — one of the (sometimes fun) pains of us using kotlin in the state it is. I had to do this not long ago for a File representation between iOS, mac, JVM, and Android - that had some Unexpected nonsense.
    t

    Tristan Blakers

    1 year ago
    good treeshaking in the browser might be able to solve this - ktor is just too heavy to use in JS, unless you really need the functionality
    b

    Benjamin Charais

    1 year ago
    And… in my experience a lot of their builders and internal tools don’t work. That can be a real pain to trace back