Documentation
¶
Overview ¶
Package har imports HTTP Archive (HAR) files as Pulse scenarios. HAR files can be exported from browser DevTools (Network tab → Save as HAR). Each recorded request becomes a named step in a pulse.Flow, replayed in the order they appear in the archive.
WARNING: HAR files often contain authentication headers and session tokens. Treat them as sensitive — do not commit them to version control.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Load ¶
Load parses HAR data from r and returns a Scenario that replays all included requests in sequence using pulse.Flow. Each step is named "<METHOD> <URL>" so failures are identifiable in the result error map.
Hop-by-hop headers (Host, Content-Length, etc.) are stripped. All other recorded headers, including Authorization, are forwarded as-is.
Types ¶
type Config ¶
type Config struct {
// Filter, when non-nil, is called for each entry. Return false to skip it.
// Use this to exclude static assets, analytics beacons, or third-party requests.
Filter func(req Request) bool
// Client is the HTTP client used to replay requests.
// When nil, a client with a 30 s timeout is used.
Client *http.Client
}
Config controls how HAR entries are imported.
type Entry ¶
type Entry struct {
Request Request `json:"request"`
}
Entry represents a single recorded HTTP transaction.