requests

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.1.24

type Client struct {
	MaxAPIRetries int
	Debug         bool
	Logger        *logger.Logger
	HttpClient    *http.Client
}

func NewKosliClient added in v0.1.24

func NewKosliClient(maxAPIRetries int, debug bool, logger *logger.Logger) *Client

func (*Client) Do added in v0.1.24

func (c *Client) Do(p *RequestParams) (*HTTPResponse, error)

type HTTPResponse

type HTTPResponse struct {
	Body string
	Resp *http.Response
}

HTTPResponse is a wrapper of http.Response with ready-extracted string body

type RequestParams added in v0.1.24

type RequestParams struct {
	Method            string
	URL               string
	Payload           interface{}
	AdditionalHeaders map[string]string
	Username          string
	Password          string
	Token             string
	DryRun            bool
}

Jump to

Keyboard shortcuts

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