https://github.com/fd0/drainchecker
https://github.com/fd0/drainchecker
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/fd0/drainchecker
- Owner: fd0
- License: bsd-2-clause
- Created: 2017-05-01T14:47:15.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-01T17:11:21.000Z (about 9 years ago)
- Last Synced: 2025-01-26T02:52:10.810Z (over 1 year ago)
- Language: Go
- Size: 1.8 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
drainchecker is a small Go library that allows checking whether HTTP response
bodies have been fully read. Otherwise, HTTP connections cannot be reused.
USAGE
=====
Wrap the default `http.DefaultRoundTripper` and it is used by `net.Get()`,
`net.Post()` etc. You can also give it to a library:
```go
http.DefaultTransport = drainchecker.RoundTripper(http.DefaultTransport)
http.DefaultClient.Transport = http.DefaultTransport
```