client

package
v0.2.14 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 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 AuthenticatedClient

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

AuthenticatedClient wraps http.Client with automatic OAuth authentication

func NewAuthenticatedClient

func NewAuthenticatedClient(cfg *config.Config) (*AuthenticatedClient, error)

NewAuthenticatedClient creates a new authenticated HTTP client

func (*AuthenticatedClient) Delete

func (c *AuthenticatedClient) Delete(ctx context.Context, path string) (*http.Response, error)

Delete performs a DELETE request to the specified path

func (*AuthenticatedClient) Do

Do performs an HTTP request with automatic authentication and retry on 401

func (*AuthenticatedClient) Get

Get performs a GET request to the specified path

func (*AuthenticatedClient) Post

func (c *AuthenticatedClient) Post(ctx context.Context, path string, body io.Reader) (*http.Response, error)

Post performs a POST request to the specified path with the given body

func (*AuthenticatedClient) Put

func (c *AuthenticatedClient) Put(ctx context.Context, path string, body io.Reader) (*http.Response, error)

Put performs a PUT request to the specified path with the given body

Jump to

Keyboard shortcuts

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