httpprobe

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Timeout      time.Duration
	Retries      int
	MaxBodyBytes int64
	UserAgent    string
	TLSVerify    bool
}

type Probe

type Probe struct {
	// contains filtered or unexported fields
}

func New

func New(opts Options) *Probe

func (*Probe) Fetch

func (p *Probe) Fetch(ctx context.Context, rawURL string) Response

func (*Probe) FetchHost

func (p *Probe) FetchHost(ctx context.Context, host string, schemes []string) []Response

type Response

type Response struct {
	URL        string      `json:"url"`
	FinalURL   string      `json:"final_url,omitempty"`
	StatusCode int         `json:"status_code,omitempty"`
	Headers    http.Header `json:"headers,omitempty"`
	Body       string      `json:"-"`
	Title      string      `json:"title,omitempty"`
	Duration   string      `json:"duration,omitempty"`
	Error      string      `json:"error,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL