Background
...
- arg: object – containing:
- version: string – release number (following semantic versioning)
- localtime: string – local time of the device (ISO8601) “YYYY-MM-DDTHH:mm:ss.sssZ”
Testing
You can test your heartbeat by posting to port 443 on https://dev.exhibition.tepapa.govt.nz/heartbeat/<product-name>
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
[...]
byte[] bodyRaw = System.Text.Encoding.UTF8.GetBytes( bodyJson );
UnityWebRequest request = new UnityWebRequest( heartbeatURL, "POST");
request.uploadHandler = new UploadHandlerRaw(bodyRaw);
request.downloadHandler = new DownloadHandlerBuffer();
request.chunkedTransfer = false;
request.timeout = heartbeatTimeout;
request.SetRequestHeader("Content-Type", "application/json");
yield return request.SendWebRequest();
if (request.isNetworkError || request.isHttpError) {
if (!request.error.Contains("no data in response")) {
Debug.Log("Heartbeat:" + request.error + " http://" + Settings("HeartbeatIP"));
}
}
[...] |