httpclient

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrPageNotFound = dopErrs.Err("page_not_found")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RequestSt

type RequestSt struct {
	Opts httpc.OptionsSt
	Raw  []byte
}

type ResponseSt

type ResponseSt struct {
	Obj any
	Raw []byte
}

type St

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

func New

func New(lg logger.Lite) *St

func (*St) Clean

func (c *St) Clean()

func (*St) GetOptions

func (c *St) GetOptions() httpc.OptionsSt

func (*St) GetRequest

func (c *St) GetRequest(path string, obj any) (*RequestSt, bool)

func (*St) GetRequests

func (c *St) GetRequests() []*RequestSt

func (*St) Send

func (c *St) Send(reqBody []byte, opts httpc.OptionsSt) ([]byte, error)

func (*St) SendJson

func (c *St) SendJson(reqObj any, opts httpc.OptionsSt) ([]byte, error)

func (*St) SendJsonRecvJson

func (c *St) SendJsonRecvJson(reqObj, repObj any, opts httpc.OptionsSt) ([]byte, error)

func (*St) SendRecvJson

func (c *St) SendRecvJson(reqBody []byte, repObj any, opts httpc.OptionsSt) ([]byte, error)

func (*St) SetResponse

func (c *St) SetResponse(path string, response ResponseSt)

func (*St) SetResponses

func (c *St) SetResponses(responses map[string]ResponseSt)

Jump to

Keyboard shortcuts

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