inv_HttpClient.clearrequestheaders( )
ls_authtoken = GetApplication().GetHttpRequestHeader("Authorization")
if ls_authtoken > ' ' then
inv_HttpClient.SetRequestHeader("Authorization", ls_authtoken , true) //If authentication is enabled
end if
//GetSessions url:
ls_url = GetApplication().getpowerserverurl( )
ls_url += "/api/Session/LoadAll"
inv_HttpClient.sendrequest("Get",ls_url)
if inv_HttpClient.getresponsestatuscode() = 200 then
inv_HttpClient.getresponsebody(ls_json)
else
is_lasterror = inv_HttpClient.getresponsestatustext( )
setnull(ls_json)
end if
//ls_json holds the session list