request

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParsingPathFailed   = errors.New("request: parsing path failed")
	ErrDecodingBase64Body  = errors.New("request: decoding base64 body")
	ErrFailToCreateRequest = errors.New("request: fail to create request")
)

Functions

func New

func New(ctx context.Context, cfg Config) (*http.Request, error)

Types

type Config

type Config struct {
	Path        string
	QueryString string
	Body        string
	IsBase64    bool
	Method      string
	Context     any
	SourceIP    string
	Headers     map[string]string
	MultiHeader map[string][]string
	Cookies     []string
	RequestID   string
	Stage       string
}

Jump to

Keyboard shortcuts

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