sessionStorageApi = ({
get: function(sessionId) {
return fetch(serverUrl + "/sessions?sessionId=" + sessionId)
.then(response=>response.json());
},
set: function(sessionId, data) {
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
};
return fetch(serverUrl + "/sessions?sessionId=" + sessionId, options)
.then(response=>response.json());
}
})