-
Roberto Milton Scheffel authored
Updates to implement finish, process MultiSmartData for v1.2 (Mobile) SmartData and MultiValue workflow support.
Roberto Milton Scheffel authoredUpdates to implement finish, process MultiSmartData for v1.2 (Mobile) SmartData and MultiValue workflow support.
finish.php 624 B
<?php
namespace SmartData;
require_once('../bin/smartdata/SmartAPI.php');
use function SmartData\SmartAPI\finish;
use SmartData\Exception\CustomException;
use SmartData\Logger;
http_response_code(HttpStatusCode::BAD_REQUEST);
try {
$content = file_get_contents('php://input');
$response = finish($content);
}catch(CustomException $e){
http_response_code($e->getHTTPCodeError());
header('X-Message: '. $e->getMessage(), false);
return false;
}catch(\Exception $e){
http_response_code(HttpStatusCode::BAD_REQUEST);
return false;
}
http_response_code(HttpStatusCode::NO_CONTENT);
echo $response;