function update_descriptions(table) props = table.Properties; json = jsonencode(struct( ... 'units', cell2struct(props.VariableUnits, props.VariableNames, 2), ... 'descriptions', cell2struct(props.VariableDescriptions, props.VariableNames, 2))); import matlab.net.http.* import matlab.net.http.io.* req = RequestMessage('put', HeaderField('Auth', 'Qnb7jfeGZM'), StringProvider(json)); url = 'https://driver-observer.thi.de/update_descriptions.php'; res = req.send(url); if res.StatusCode ~= StatusCode.OK throw(MException('update_descriptions:http_error', ... 'HTTP Error %s (%s); Body: %s', string(res.StatusCode), ... string(getReasonPhrase(res.StatusCode)), res.Body.Data)); end end