http

package
v1.7.10 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Caller

type Caller interface {
	Post(url string, body []byte, stream bool) ([]byte, error)
	Get(url string) ([]byte, error)
}

func RealCallerFactory

func RealCallerFactory(cfg config.Config) Caller

type CallerFactory

type CallerFactory func(cfg config.Config) Caller

type RestCaller

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

func New

func New(cfg config.Config) *RestCaller

func (*RestCaller) Get

func (r *RestCaller) Get(url string) ([]byte, error)

func (*RestCaller) Post

func (r *RestCaller) Post(url string, body []byte, stream bool) ([]byte, error)

func (*RestCaller) ProcessResponse

func (r *RestCaller) ProcessResponse(reader io.Reader, writer io.Writer) []byte

Jump to

Keyboard shortcuts

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