-
Notifications
You must be signed in to change notification settings - Fork 4
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
Are HTTP connections closed after each call? #11
Comments
No this library doesn't re-use connections, that's not the intent of that statement. To re-use a single connection you may want to look at https://docs.racket-lang.org/http/index.html That library will provide the primitives to do what you want, you could build up your own abstractions if necessary. |
You may also be interested in this thread racket/racket#3125 (comment) |
Thank you for the references. I will continue reading. I am a bit disappointed to find that there is not a comparable library to Python’s |
As someone who has written several not-so-good ones, good HTTP clients are hard to write. If you're interesting in helping out @DarrenN without reinventing the wheel, then an FFI wrapper around libcurl so we can use HTTP/2 and HTTP/3 would be a great way to improve things. Racket's community is several orders of magnitude smaller than Rust's, so there are lots of gaps in the ecosystem. |
Hi,
I’m looking for a simple library to make HTTP requests, similar to Python’s venerable
requests
module. Whilesimple-http
looks like a good candidate, after reviewing the code, it seems that there is no way to keep the HTTP connection open, which seems at odds with this stated use case in the documentation:I’m trying to decide on a new language to learn. One of my initial criteria is whether there is an HTTP library that I can use to make repeated HTTP requests efficiently to an API. Am I correct that each HTTP call opens a new HTTP connection to the server? I have no Racket experience, so maybe I misread the code.
The text was updated successfully, but these errors were encountered: