httpclient

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	//ErrCannotParseData cannot parse html data error
	ErrCannotParseData = errors.New("data: parse error")
)

Functions

func LoginConfirm

func LoginConfirm(ctx context.Context, account interface{}, timeout time.Duration) error

LoginConfirm 验证账号密码

func Punch

func Punch(ctx context.Context, account interface{}, timeout time.Duration) (err error)

Punch 打卡

func SetSslVerify added in v1.1.1

func SetSslVerify(verify bool)

SetSslVerify when set false, insecure connection will be allowed

Types

type Account added in v1.0.12

type Account struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

Account account info for login

func (Account) Name added in v1.0.12

func (a Account) Name() string

Name get the name of the account

type CookieNotFoundErr

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

CookieNotFoundErr error interface for Cookies

func (CookieNotFoundErr) Error

func (t CookieNotFoundErr) Error() string

type QueryParam

type QueryParam struct {
	Wid    string `url:"wid"`
	UserID string `url:"userId"`
}

QueryParam query param struct

Jump to

Keyboard shortcuts

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