simplehttp

package module
v0.0.0-...-e9a59ba Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 17 Imported by: 2

README

go-simplehttp

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleHttp

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

func New

func New(s string, lg *logrus.Logger) SimpleHttp

func (*SimpleHttp) AddHeader

func (sh *SimpleHttp) AddHeader(k string, v string)

func (*SimpleHttp) BuildUrl

func (sh *SimpleHttp) BuildUrl(url string, values interface{}) string

Use the schema tags to build the url

func (*SimpleHttp) Get

func (sh *SimpleHttp) Get(url string) (string, error)

func (*SimpleHttp) GetJson

func (sh *SimpleHttp) GetJson(url string, dst interface{}) error

func (*SimpleHttp) Post

func (sh *SimpleHttp) Post(url string, data interface{}) (string, error)

func (*SimpleHttp) PostJson

func (sh *SimpleHttp) PostJson(url string, dst interface{}, parseResponse bool) error

func (*SimpleHttp) PostPriv

func (sh *SimpleHttp) PostPriv(url string, data interface{}, method string) (string, error)

func (*SimpleHttp) Put

func (sh *SimpleHttp) Put(url string, data interface{}) (string, error)

func (*SimpleHttp) SetBasicAuth

func (sh *SimpleHttp) SetBasicAuth(username string, password string)

func (*SimpleHttp) SetBearerAuth

func (sh *SimpleHttp) SetBearerAuth(key string)

func (*SimpleHttp) SetCustomCA

func (sh *SimpleHttp) SetCustomCA(cert string) error

func (*SimpleHttp) SkipTLSVerification

func (sh *SimpleHttp) SkipTLSVerification()

Jump to

Keyboard shortcuts

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