cbergoon / httpstatus

HTTP Status Check Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HTTP Status

Report Docs Version

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.

Documentation

See the docs here.

Install

go get github.com/cbergoon/httpstatus

Example Usage

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)
	}
}

License

This project is licensed under the MIT License.

About

HTTP Status Check Library

License:MIT License


Languages

Language:Go 100.0%