Constructors
constructor
- new Agent(__namedParameters?: AgentOptions): Agent
-
Parameters
-
__namedParameters: AgentOptions = {}
Properties
Optional session
session: Session
Methods
call
- call<K>(url: string, options?: MRequestOptions<"json">, body?: Record<string, unknown>): Promise<RequestResult<K>>
-
Type parameters
Parameters
-
url: string
-
options: MRequestOptions<"json"> = {}
-
Optional body: Record<string, unknown>
Returns Promise<RequestResult<K>>
loginWithSession
- loginWithSession(path: string): Promise<boolean>
-
Parameters
Returns Promise<boolean>
saveSession
- saveSession(path: string): Promise<boolean>
-
Parameters
Returns Promise<boolean>
setSession
- setSession(session: Session): void
Static call
- call<T>(url: string, options?: MRequestOptions<"json">, body?: Record<string, unknown>): Promise<RequestResult<T>>
-
Type parameters
Parameters
-
url: string
-
options: MRequestOptions<"json"> = {}
-
Optional body: Record<string, unknown>
Returns Promise<RequestResult<T>>
Static saveSession
- saveSession(path: string, session: Session): Promise<boolean>
-
Parameters
-
path: string
-
session: Session
Returns Promise<boolean>