rest

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTimeout = 30 * time.Second

Variables

View Source
var ErrUnexpectedStatusCode = errors.New("unexpected status code")

Functions

func SendRequest

func SendRequest(reqSpec *Request, validStatusCodes []int) (string, error)

Types

type Request

type Request struct {
	URL     string
	Method  string
	Headers map[string]string
	Body    string
	Timeout time.Duration
}

Jump to

Keyboard shortcuts

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