19.06.2023, 08:04
Log the response from the CrossLogin request:
Code:
res, code, hdrs, stat = socket.http.request({
url = "https://eu.semsportal.com/api/v2/Common/CrossLogin",
method = "POST",
headers = headers,
source = ltn12.source.string(body),
sink = ltn12.sink.table(response),
})
if res and code == 200 then
response = json.decode(table.concat(response))
log(response)
headers.token = json.encode(response.data)