-
Notifications
You must be signed in to change notification settings - Fork 72
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
Expose Internal Functions for Enhanced Usability #166
Comments
I have created a PR #167 featuring a sample implementation. Please let me know if it is acceptable in its current or any alternate form, or what changes are required. At the moment, it lacks proper commenting and formatting; I will make the necessary adjustments once we agree on the final form of the implementation. |
Hi, sorry for the delay. Exposing those functions sounds good to me, though will need documentation. I'll continue discussion on the PR. |
Thanks, closing this issue as #167 was merged. |
For reference: we use it in lua-corehttp. |
Description
We are looking to build more sophisticated applications on top of the coreHTTP library. Our use case requires support for chunked body reads and writes, streaming, and other advanced HTTP functionalities. However, the current encapsulation of sendHttpHeaders, sendHttpData, receiveAndParseHttpResponse functions restricts our ability to extend or adapt the library to our needs.
Solution
We propose exposing the following internal functions as part of the public API:
By making these functions accessible, developers can have more control over the HTTP communication process, allowing for more complex use cases, such as handling chunked transfers, streaming data, and more.
Alternatives
Currently, we are patching coreHTTP during the build. This is a relatively easy patch so we can apply it during the build process and use it as if these functions are built into the core library. However, having these functions exposed officially in the library would provide a more robust and community-supported solution.
This is direct evolution of #160.
NOTE: We are right now testing this on portion of our production services as replacement for libcurl. We managed to drop binary size by ~30% while maintaining feature set.
The text was updated successfully, but these errors were encountered: