httpClient

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 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 Config

type Config struct {
	HttpTimeout time.Duration
}

type Handler

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

func New

func New(ctx context.Context, config Config) *Handler

func (*Handler) Get

func (h *Handler) Get(ctx context.Context, url string, options ...Option) (Response, error)

func (*Handler) PutStream

func (h *Handler) PutStream(ctx context.Context, url string, body io.Reader, options ...Option) (Response, error)

type Option

type Option func(cfg *optionConfig)

func ContentType

func ContentType(contentType string) Option

type Response

type Response struct {
	StatusCode int
	Body       []byte
}

Jump to

Keyboard shortcuts

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