http

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	http.Client

	// Retries is the number of times the client will attempt to resend failed
	// HTTP requests before giving up.
	Retries int
	// contains filtered or unexported fields
}

Client is a specialized HTTP client, configured with mutual TLS certificate authentication.

func NewHTTPClient

func NewHTTPClient(config *tls.Config, ua string) *Client

NewHTTPClient creates a client with the given TLS configuration and user-agent string.

func (*Client) Do

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

func (*Client) Get

func (c *Client) Get(url string) (*http.Response, error)

func (*Client) Post

func (c *Client) Post(url string, headers map[string]string, body []byte) (*http.Response, error)

Jump to

Keyboard shortcuts

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