Replies: 1 comment 4 replies
-
|
I checked code here, and seems like this |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
Hi I would like to ask if you could add an integration into java.net.http.HttpClient, which is now available due to the upgrade of the baseline to JDK-17.
It allows using a handler that can be used simmilar to the Jax-RS client, which could make that client a little bit obsolete.
It has two places, where we can serialize and deserialize - on transmit and on receive. The receive part is a little bit more tricky, since APIs could respond with different objects. However when this is the goal, It would be better to not handle this case directly in the client and deserialize afterwards.
Describe the solution you'd like
I made a working prototype here:
https://github.com/fabianfrz/jackson-http-client
I made this work with practically no external dependencies (only junit + mockito) for testing.
However I am not sure how to bring this into the Jackson world. Should there be a different repo, put those classes to core or whatever.
Also I am currently not sure if this should offload data to disk if it is too large and the index of the byte array is limitted to int so the may file size is currently 4GiB in my code.
Usage example
See test classes:
Additional context
There is a notable change regarding HTTPClient: in newer JDKs, HTTPClient will implement AutoClosable in newer JDK versions to free up resources early as you can the usage in the tests. So currently I cannot close them with the try-with-resources block which means that the test source may not free up immediately.
Beta Was this translation helpful? Give feedback.
All reactions