1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-09 13:30:04 +00:00

feat: added isUrl validation utility

This commit is contained in:
Yury Shkoda
2020-09-07 16:32:53 +03:00
parent 1f970e1102
commit 0eb9bc43ff
6 changed files with 33 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
import { Session, Context, CsrfToken } from './types'
import { asyncForEach, makeRequest } from './utils'
import { asyncForEach, makeRequest, isUrl } from './utils'
const MAX_SESSION_COUNT = 1
@@ -8,7 +8,10 @@ export class SessionManager {
private serverUrl: string,
private contextName: string,
private setCsrfToken: (csrfToken: CsrfToken) => void
) {}
) {
if (serverUrl) isUrl(serverUrl)
}
private sessions: Session[] = []
private currentContext: Context | null = null
private csrfToken: CsrfToken | null = null