Methods
checkLogin
- checkLogin(): Promise<void>
request
- request(host: string, path: string, method: string, payload?: any): Promise<any>
-
Parameters
-
host: string
-
path: string
-
method: string
-
Default value payload: any = {csrf_token: '',}
Returns Promise<any>
requestWithSetCookie
- requestWithSetCookie(host: string, path: string, method: string, payload?: any): Promise<any>
-
Parameters
-
host: string
-
path: string
-
method: string
-
Default value payload: any = {csrf_token: '',}
Returns Promise<any>
用户信息,当手动调用登录或者 load 之后,此对象会自动实例化 通过调用
user.toJSON()
获取可以用于存储的对象,当下次实例化的时候,通过client.load
恢复登录状态