http

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package http provides utilities to handle http requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Client *http.Client
}

Client struct to handle http requests.

func NewHTTPClient

func NewHTTPClient(timeout time.Duration) *Client

NewHTTPClient creates a new HttpClient with a specified timeout.

func (*Client) Curl

func (hc *Client) Curl(ctx context.Context, url string) (*http.Response, []byte, error)

Curl executes a curl command to the specified target. It returns the response and the body of the response, or an error if the request fails.

Jump to

Keyboard shortcuts

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