httpx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package httpx provides a shared HTTP client with retry logic, timeouts, and helpers

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 wraps an HTTP client with retry logic and performance optimizations

func New

func New(logger *zap.Logger) *Client

New creates a new HTTP client with optimal settings for performance

func (*Client) DoJSON

func (c *Client) DoJSON(ctx context.Context, req *http.Request, result interface{}) error

DoJSON performs an HTTP request and unmarshals the JSON response It includes retry logic with exponential backoff for transient errors

func (*Client) Get

func (c *Client) Get(ctx context.Context, url string, result interface{}) error

Get is a convenience wrapper for GET requests

Jump to

Keyboard shortcuts

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