comicclient

package
v0.0.0-...-c693a81 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(cfg *Config, middleware ...Middleware) *http.Client

Types

type Config

type Config struct {
	Timeout time.Duration `mapstructure:"timeout"`
	BaseURL *url.URL      `mapstructure:"base_url"`
}

type Middleware

type Middleware func(http.RoundTripper) http.RoundTripper

func AddBaseMiddleware

func AddBaseMiddleware(url *url.URL) Middleware

func MiddlewareChain

func MiddlewareChain(chain ...Middleware) Middleware

type MiddlewareFn

type MiddlewareFn func(*http.Request) (*http.Response, error)

func (MiddlewareFn) RoundTrip

func (m MiddlewareFn) RoundTrip(req *http.Request) (*http.Response, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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