httpclient

package
v0.5.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Username string
	Password string
}

type HttpOptions

type HttpOptions struct {
	VerifySsl bool
}

type HttpRequest added in v0.2.0

type HttpRequest interface {
	SetUrl(string) HttpRequest
	SetMethod(string) HttpRequest
	AddHeader(string, string) HttpRequest
	AddHeaders(map[string]string) HttpRequest
	SetBody(io.Reader) HttpRequest
	SetAuth(*Auth) HttpRequest
	SetResult(interface{}) HttpRequest

	Url() string
	Method() string
	Headers() map[string]string
	Body() io.Reader
	Auth() *Auth
	Result() interface{}
}

type Instance

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

func NewClient

func NewClient() *Instance

func NewClientWithOptions

func NewClientWithOptions(options HttpOptions) *Instance

func (*Instance) Execute

func (ins *Instance) Execute(req HttpRequest) error

func (*Instance) NewRequest added in v0.2.0

func (ins *Instance) NewRequest() HttpRequest

Jump to

Keyboard shortcuts

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