httpcaller

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructPamTID added in v1.8.0

func ConstructPamTID(tid string) string

Types

type Caller

type Caller interface {
	DoCall(config Config) (*http.Response, error)
}

Caller abstracts http calls

type Config

type Config struct {
	HTTPMethod  string
	URL         string
	Username    string
	Password    string
	APIKey      string
	TID         string
	ContentType string
	Entity      io.Reader
}

type DefaultCaller

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

Default implementation of Caller

func NewCaller

func NewCaller(timeoutSeconds int) DefaultCaller

func (DefaultCaller) DoCall

func (c DefaultCaller) DoCall(config Config) (resp *http.Response, err error)

Performs http GET calls using the default http client

Jump to

Keyboard shortcuts

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