Kotlin / dataframe

Structured data processing in Kotlin
https://kotlin.github.io/dataframe/overview.html
Apache License 2.0
842 stars 63 forks source link

Remove dependency on fuel #904

Open koperagen opened 1 month ago

koperagen commented 1 month ago

There's exactly 1 usage of this library in catchHttpResponse method. I reckon it was used for cases when HTTP response is other than 200, so usual URL.readText won't work to parse response body. But apparently URL.connection as HttpUrlConnection opens a lot possibilities, including reading response body even in case of 404 errors It'll save us ~300kb artifact size

Jolanrensen commented 1 month ago

I'll avoid it in https://github.com/Kotlin/dataframe/issues/827 :)

Something like https://github.com/Kotlin/dataframe/blob/fdb703232bc9a5d65f3214b63ddb5da8fb5a6db4/dataframe-csv/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/io/ioUtils.kt#L18

It also parses the error stream as JSON, similar to before. It can catch APIs like https://api.binance.com/api/v3/klines?symbol=BTCUSDT

koperagen commented 1 month ago

Seems like it