httpclient

package
v0.5.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTimeoutSeconds

func ParseTimeoutSeconds(value string, fallback time.Duration) time.Duration

Types

type Client

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

func New

func New(cfg Config) (*Client, error)

func (*Client) GetText

func (c *Client) GetText(ctx context.Context, rawURL string) (string, error)

func (*Client) PostForm

func (c *Client) PostForm(ctx context.Context, rawURL, body string) error

func (*Client) PostXML

func (c *Client) PostXML(ctx context.Context, rawURL, body string) error

type Config

type Config struct {
	Timeout      time.Duration
	UserAgent    string
	Proxy        string
	Retries      int
	AllowPrivate bool
	MaxBody      int64
}

Jump to

Keyboard shortcuts

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