http

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPClient

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

HTTPClient HTTP client

func NewHTTPClient

func NewHTTPClient(baseURL, authToken string) *HTTPClient

NewHTTPClient creates a new HTTP client

func (*HTTPClient) Delete

func (c *HTTPClient) Delete(ctx context.Context, path string) error

Delete sends a DELETE request

func (*HTTPClient) Get

func (c *HTTPClient) Get(ctx context.Context, path string, params map[string]string) ([]byte, error)

Get sends a GET request

func (*HTTPClient) Post

func (c *HTTPClient) Post(ctx context.Context, path string, body interface{}) ([]byte, error)

Post sends a POST request

func (*HTTPClient) Put

func (c *HTTPClient) Put(ctx context.Context, path string, body interface{}) ([]byte, error)

Put sends a PUT request

func (*HTTPClient) SetHeader

func (c *HTTPClient) SetHeader(key, value string)

SetHeader sets a custom header

Jump to

Keyboard shortcuts

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