I've been testing Spine since yesterday and it's r...
# opensavvy
u
I've been testing Spine since yesterday and it's really great, thank you very much!
❤️ 1
c
If you have any feedback, it's the perfect time! I'm planning on releasing 1.0 soon (a month or two hopefully)
u
It's not much, but I was a bit lost trying to find the documentation. First, I was on the OpenSavy site opensavvy.dev/libraries/groundwork/spine.html, then I had to go to the repo to finally find spine.opensavvy.dev
and then I wonder, why not want to use compiler plugin ?
Otherwise, I would have liked a very simple example repo that I could run myself; in principle, I find that more illustrative than documentation, but I'm struggling 🙂
For now, I don't have enough perspective yet to give truly constructive feedback on the library itself, but I find it very cool to use.
c
Oh right, the OpenSavvy website should link to the Spine site directly
why not want to use compiler plugin ?
Because then I'd have to release a new version for every Kotlin version, and that'd be a massive pain especially if other people build libraries on top of it. Also, what would it even do? I can do everything I want within the rules of the Kotlin language itself
👍 1
u
Because then I'd have to release a new version for every Kotlin version, and that'd be a massive pain especially if other people build libraries on top of it. Also, what would it even do? I can do everything I want within the rules of the Kotlin language itself
Yes, I understand, it was just that Ktor resources have less boilerplate, but it's true that it's not worth it.
c
Spine does a lot more than Ktor resources, though
u
yes that is why I want to use it 🙂
Spine delegates serialization to Ktor ContentNegotiation, so any format should work. Why does
HttpClient.request()
then set
Content-Type: application/json
by default? Is that intentional, or should the Content-Type be left to the client / the installed converter?
c
With normal Ktor you have to specify the content type on every call: https://ktor.io/docs/client-serialization.html#send_data I'm not aware of a way to configure it as a global default. Since it's a pain to do it each time, and I'm pretty sure most users want JSON anyway, I decided to make that the default
If there is a way to configure a global default, I'll change the Spine default to ‘whatever is the global default’
You can explicitly override `...request(..., contentType = ...)`yourself if needed
Server-side there is no default, content-negotiation is autonomous