mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-07 12:30:06 +00:00
feat(log): made 'fetchLogFileContent' method public
This commit is contained in:
13
src/SASjs.ts
13
src/SASjs.ts
@@ -1264,10 +1264,19 @@ export default class SASjs {
|
||||
}
|
||||
}
|
||||
|
||||
private fetchLogFileContent(logLink: string) {
|
||||
/**
|
||||
* Fetches content of the log file
|
||||
* @param logLink - url of the log file.
|
||||
* @param accessToken - an access token for an authorized user.
|
||||
*/
|
||||
public fetchLogFileContent(logLink: string, accessToken: string) {
|
||||
return new Promise((resolve, reject) => {
|
||||
fetch(logLink, {
|
||||
method: 'GET'
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: 'Bearer ' + accessToken
|
||||
}
|
||||
})
|
||||
.then((response: any) => response.text())
|
||||
.then((response: any) => resolve(response))
|
||||
|
||||
Reference in New Issue
Block a user