package
module
Version:
v0.0.0-...-fbae24a
Opens a new window with list of versions in this module.
Published: Dec 3, 2019
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
httpreused
Usage
package main
import (
"fmt"
"net/http"
"github.com/skaji/go-httpreused"
)
func main() {
c := httpreused.Wrap(http.DefaultClient)
for i := 0; i < 2; i++ {
res, err := c.Get("https://www.google.com")
if err != nil {
panic(err)
}
reused := res.Header.Get("X-Connection-Reused")
ip := res.Header.Get("X-Connection-IP")
fmt.Println(i, ip, reused)
}
}
❯ go run main.go
0 172.217.26.36 false
1 172.217.26.36 true
Documentation
¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.