Skip to content

Remove dependency on fuel #904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
koperagen opened this issue Oct 2, 2024 · 2 comments
Closed

Remove dependency on fuel #904

koperagen opened this issue Oct 2, 2024 · 2 comments
Assignees
Labels
good first issue Good issues to pick-up for newcomers
Milestone

Comments

@koperagen
Copy link
Collaborator

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

@koperagen koperagen added the good first issue Good issues to pick-up for newcomers label Oct 2, 2024
@koperagen koperagen added this to the Backlog milestone Oct 2, 2024
@Jolanrensen
Copy link
Collaborator

Jolanrensen commented Oct 3, 2024

I'll avoid it in #827 :)

Something like

internal fun catchHttpResponse(url: URL, body: (InputStream) -> AnyFrame): AnyFrame {

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
Copy link
Collaborator Author

Seems like it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issues to pick-up for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants