An open API service indexing awesome lists of open source software.

https://github.com/fd0/drainchecker


https://github.com/fd0/drainchecker

Last synced: about 1 year ago
JSON representation

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
```