net

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestHeader struct {
	XRequestedWith    string
	XRequestedWithXML string

	ContentType     string
	ContentTypeJSON string
}
View Source
var RequestMethod struct {
	GET    string
	POST   string
	PUT    string
	DELETE string
}

Functions

func GetLocalIP

func GetLocalIP() string

func Hex2Dec

func Hex2Dec(val string) int64

func Mac

func Mac() string

func MacInt64

func MacInt64() int64

func Macs

func Macs() []string

Types

type HttpClient

type HttpClient struct {
	Host    string
	Context string
	Uri     string
	Url     string
	Method  string
	Headers map[string]string
	Data    interface{}
	Timeout time.Duration
	Then    chan interface{}
	Catch   chan error
}

func NewHttpClient

func NewHttpClient() *HttpClient

func (*HttpClient) Delete

func (hc *HttpClient) Delete()

func (*HttpClient) DeleteSync

func (hc *HttpClient) DeleteSync()

func (*HttpClient) Get

func (hc *HttpClient) Get()

func (*HttpClient) GetSync

func (hc *HttpClient) GetSync() (string, error)

func (*HttpClient) Post

func (hc *HttpClient) Post()

func (*HttpClient) PostSync

func (hc *HttpClient) PostSync() (string, error)

func (*HttpClient) Put

func (hc *HttpClient) Put()

func (*HttpClient) PutSync

func (hc *HttpClient) PutSync()

func (*HttpClient) SetHeader

func (hc *HttpClient) SetHeader(req *http.Request, force ...bool)

Jump to

Keyboard shortcuts

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