2 ms·
Python’s request is exactly the same (the client is called Session). I guess the go client just uses a global connection pool by default?
by masklinn 4y ago
Python’s request is exactly the same (the client is called Session). I guess the go client just uses a global connection pool by default?
- jen20 4y agoYes - `DefaultClient` in `net/http` is what the various package level methods operate on. This is constitutionally bad as global state that dependencies can mutate at will during init (or any other time), hence go-cleanhttp [1]. [1]: https://github.com/hashicorp/go-cleanhttp https://github.com/hashicorp/go-cleanhttp