headless

package
v0.0.180 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: Apache-2.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkHeaderCapture added in v0.0.112

type NetworkHeaderCapture struct {
	Headers map[string][]string
	// contains filtered or unexported fields
}

NetworkHeaderCapture stores captured response headers

func NewNetworkHeaderCapture added in v0.0.112

func NewNetworkHeaderCapture() *NetworkHeaderCapture

NewNetworkHeaderCapture creates a new header capture instance

func (*NetworkHeaderCapture) GetHeaders added in v0.0.112

func (n *NetworkHeaderCapture) GetHeaders() map[string][]string

GetHeaders safely gets headers

func (*NetworkHeaderCapture) SetHeaders added in v0.0.112

func (n *NetworkHeaderCapture) SetHeaders(headers map[string][]string)

SetHeaders safely sets headers

type Requester

type Requester struct {
	Browser                    *rod.Browser
	PathToBrowser              *string
	TimeoutSeconds             int
	MinDOMStabalizeTimeSeconds int
}

Requester manages a headless browser instance and configuration for making requests.

func NewRequester

func NewRequester(timeout int, config *common.HeadlessRequestConfig) *Requester

NewRequester creates a new Requester with the given timeout and headless configuration.

func NewRequesterWithClient

func NewRequesterWithClient(client *cdp.Client, timeout int, minDOMStabalizeTime int) *Requester

NewRequesterWithClient creates a new Requester using an existing rod cdp.Client.

func NewRequesterwithBrowser added in v0.0.112

func NewRequesterwithBrowser(timeout int, config *common.HeadlessRequestConfig) *Requester

NewRequesterwithBrowser creates a new Requester with the given timeout and headless configuration.

func (*Requester) InitializeBrowser

func (b *Requester) InitializeBrowser(ctx context.Context) error

InitializeBrowser starts a headless browser instance and establishes connection

func (*Requester) SendRequest

SendRequest navigates to a URL using the headless browser and captures the response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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