httpclient

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package httpclient contains an http client

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client manages making HTTP requests to the API.

func New

func New(baseURL string) *Client

New creates a new internal HTTP client.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, path string, target any) error

Delete makes a DELETE request.

func (*Client) Get

func (c *Client) Get(ctx context.Context, path string, params any, target any) error

Get makes a GET request.

func (*Client) Post

func (c *Client) Post(ctx context.Context, path string, body any, target any) error

Post makes a POST request.

func (*Client) SetAPIKey

func (c *Client) SetAPIKey(key *string)

func (*Client) SetAuthToken

func (c *Client) SetAuthToken(token *string)

SetAuthToken updates the authentication token.

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(baseURL string)

SetBaseURL updates the base URL used for requests.

func (*Client) SetUserAgent

func (c *Client) SetUserAgent(userAgent *string)

Jump to

Keyboard shortcuts

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