httpclient

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client *http.Client

Functions

This section is empty.

Types

type Config

type Config struct {
	TimeoutInSeconds   int
	InsecureSkipVerify bool
}

type HTTPClient

type HTTPClient struct {
	Client *http.Client
}

func New

func New() *HTTPClient

Create a new HTTPClient

func (*HTTPClient) DoRequest

func (h *HTTPClient) DoRequest(params Request) (*http.Response, error)

Make a HTTP request using default http.Client.Do function

type Request

type Request struct {
	Method  string
	URL     string
	Headers map[string]string
	Body    io.Reader
	Config  Config
}

Jump to

Keyboard shortcuts

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