httpx

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package httpx wraps bogdanfinn/tls-client for Chrome-like TLS fingerprints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadAll

func ReadAll(resp *http.Response) ([]byte, error)

ReadAll reads and closes the response body.

Types

type Client

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

Client is a thin wrapper around tls-client with proxy support.

func New

func New(opts Options) (*Client, error)

New builds a Chrome-profile tls-client.

func (*Client) Delete

func (c *Client) Delete(urlStr string, headers map[string]string) (*http.Response, error)

Delete issues a DELETE with query params already in urlStr.

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

Do executes a request.

func (*Client) Get

func (c *Client) Get(urlStr string, headers map[string]string) (*http.Response, error)

Get is a convenience GET.

func (*Client) PostForm

func (c *Client) PostForm(urlStr string, form url.Values, headers map[string]string) (*http.Response, error)

PostForm posts application/x-www-form-urlencoded body.

type Options

type Options struct {
	Proxy   string
	Timeout time.Duration
}

Options configures a new Client.

Jump to

Keyboard shortcuts

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