httpclnt

package
v0.0.0-...-be3da68 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHostPort

func GetHostPort(url string) (string, int)

Types

type HTTPExecuter

type HTTPExecuter struct {
	AuthType string
	// contains filtered or unexported fields
}

func New

func New(oauthHost string, oauthPath string, clientId string, clientSecret string, userId string, password string, host string, scheme string, port int, showLogs bool) *HTTPExecuter

New returns an initialised HTTPExecuter instance.

func (*HTTPExecuter) ExecGetRequest

func (e *HTTPExecuter) ExecGetRequest(path string, headers map[string]string) (resp *http.Response, err error)

func (*HTTPExecuter) ExecRequestWithCookies

func (e *HTTPExecuter) ExecRequestWithCookies(method string, path string, body io.Reader, headers map[string]string, cookies []*http.Cookie) (resp *http.Response, err error)

func (*HTTPExecuter) LogError

func (e *HTTPExecuter) LogError(resp *http.Response, callType string) (err error)

func (*HTTPExecuter) ReadRespBody

func (e *HTTPExecuter) ReadRespBody(resp *http.Response) ([]byte, error)

Jump to

Keyboard shortcuts

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