1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-06 20:10:05 +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

@@ -2,7 +2,8 @@ import {
isAuthorizeFormRequired,
parseAndSubmitAuthorizeForm,
convertToCSV,
makeRequest
makeRequest,
isUrl
} from './utils'
import * as NodeFormData from 'form-data'
import * as path from 'path'
@@ -26,7 +27,10 @@ export class SASViyaApiClient {
if (!rootFolderName) {
throw new Error('Root folder must be provided.')
}
if (serverUrl) isUrl(serverUrl)
}
private csrfToken: CsrfToken | null = null
private rootFolder: Folder | null = null
private sessionManager = new SessionManager(