You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your question and for opening this issue 🙏🏻
Your question is a very good question and it illuminates a design flaw in the current HTTP client.
In theory, you could try to use the http_pause / http_resume features. They were designed for authoring responses, but they could be used for suspending requests... however, this will probably fail if the server disconnects the keep-alive connection before you can use it again.
I believe what you are looking for is a smarter HTTP client feature, allowing you to send requests and receive results without the need to re-establish connections (even if they were lost).
This is a feature that facil.io 0.7.x doesn't have even though it's possible to write one using the existing facil.io API.
I would love to add this to the roadmap, maybe get it working for facil.io 0.9.0 (maybe even added to an 0.8.x releases)... but sadly I don't have time to work on this.
The pieces for a "smart" client are already available. The HTTP/1.1 parser supports both client mode and server mode. You can easily write your own API / extension to make for a nice, persistent, HTTP client.
If you make something nice, I would appreciate a PR. Maybe I can learn from your design and update the simple client to use a better approach.
I sent http request body with the first time on_response, and process the returned second time on_response body.
so, how can I keep a http client connection alive to reuse the http socket connection to some server? Can I do that? @boazsegev
Thanks
The text was updated successfully, but these errors were encountered: