HTTP Status collects timing and other statistics about an HTTP request.
This is an adaptation of davecheney/httpstat making it usable by other applications as a library.
See the docs here.
go get github.com/cbergoon/httpstatus
package main
import (
"fmt"
"github.com/cbergoon/httpstatus"
)
func main() {
// Good Example Sites: badssl.com, neverssl.com
t, err := httpstatus.NewHttpStatusTester("expired.badssl.com/")
if err != nil {
fmt.Println(err)
}
t.Insecure = false
t.Run()
fmt.Printf("%+v", t)
for _, s := range t.Statistics {
fmt.Printf("%+v", s)
}
}
This project is licensed under the MIT License.