httptool

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Method     string
	Endpoint   string
	StatusCode int
	Data       []byte
}

Error represents an http error.

func (Error) Error

func (e Error) Error() string

type HttpTool

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

func New

func New(ctx context.Context, timeout time.Duration) (*HttpTool, error)

func (*HttpTool) GetRequest

func (h *HttpTool) GetRequest(ctx context.Context, endpoint string) (io.Reader, error)

Jump to

Keyboard shortcuts

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