htc

package
v0.0.0-...-5a8d4fd Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package htc implements the request workflow used by the htc command.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrResponseStatus = errors.New("unexpected HTTP response status")
)

ErrResponseStatus indicates that the request completed with a non-2xx status.

Functions

This section is empty.

Types

type FormField

type FormField struct {
	Name  string
	Value string
}

FormField is an ordered form field.

type Method

type Method string

Method is an HTTP method that the htc command supports.

type Request

type Request struct {
	URL     url.URL
	Method  Method
	Browser browsercookie.Browser
	Profile string
	Data    json.RawMessage
	Form    []FormField
	Headers http.Header
}

Request contains validated inputs for an HTTP request made with browser cookies.

type Runner

type Runner interface {
	Execute(context.Context, io.Writer, io.Writer, Request) error
}

Runner executes HTTP requests made with browser cookies.

func New

func New() Runner

New returns a Runner that loads cookies from locally installed browsers.

Jump to

Keyboard shortcuts

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