-
Notifications
You must be signed in to change notification settings - Fork 0
client API methods general
Get/set the level of log output.
Please note that you can write the log output to a file if you run the node module like this:
node myScript.js > myLog.txt 2>&1Get / set the language of the log output.
The english texts for errors and tasks are hardcoded. You can set a different output language by assigning an { [key: string]:any; } object containing the required templates. See src/languages/german.ts for an example language resource file.
Returns the host used to create the client like "https://fsi.myDomain.tld"
Returns the URL to use for queries like "https://fsi.myDomain.tld/fsi/server?"
Returns the URL to use for service requests like "https://fsi.myDomain.tld/fsi/service/file"
Returns a new abort controller instance. The abort controller instance can be passed to IOptions or its descendants like IHTTPOptions in order to be able to abort a request.
const abortController = client.getNewAbortController();
client.login("user", "password")
.then( () => {
client.listServer("images/newDir", {
"recursive":true,
"abortController":abortController
})
.then( (success) => {
console.log("listServer finished with result " + success);
})
.catch(console.error)
.finally( () => {
client.logout();
});
})
.catch(console.error);
// abort the listServer request
abortController.abort();Documentation
-
Interfaces