Constructor
new OKMWebservice()
Example
import OKMWebservice from 'okmwebservice';
const ws = new OKMWebservice({
baseUrl: 'http://localhost:8080/openkm'
});
const username = 'okmAdmin';
const password = 'password';
ws.auth.login(username, password).then( response => {
console.log(response);
});
Methods
getJSessionId() → {string}
Get the JSESSIONID
Returns:
Return the JSESSIONID value
- Type
- string
getJSessionId() → {string}
Get the JSESSIONID
Returns:
Return the JSESSIONID value
- Type
- string
getToken() → {*}
Get the current token
Returns:
Return the current token
- Type
- *
getToken() → {*}
Get the current token
Returns:
Return the current token
- Type
- *
setHostUrl(hostUrl)
Set the host url
Parameters:
Name | Type | Description |
---|---|---|
hostUrl |
The host url |
setHostUrl(hostUrl)
Set the host url
Parameters:
Name | Type | Description |
---|---|---|
hostUrl |
The host url |
setJSessionId(jSessionId)
Set the JSESSIONID in webservice module
Parameters:
Name | Type | Description |
---|---|---|
jSessionId |
setJSessionId(jSessionId)
Set the JSESSIONID in webservice module
Parameters:
Name | Type | Description |
---|---|---|
jSessionId |
setToken(token)
Set the token in webservice modules variables
Parameters:
Name | Type | Description |
---|---|---|
token |
The authorization token value |
setToken(token)
Set the token in webservice modules variables
Parameters:
Name | Type | Description |
---|---|---|
token |
The authorization token value |