void postTestLog(TestLogObject log, UploadCallback successCallback = null, UploadCallback failureCallback = null) { if (verbose) { print("posting test log"); } RestClient.Put <TestLogObject>($"{databaseURL}/test/{log.timestamp}.json", log) .Then(response => { if (successCallback != null) { successCallback("Uploaded successfully"); } } ).Catch(err => { if (failureCallback != null) { failureCallback(err.Message); } } ); }
public void WriteTestMessage() { TestLogObject logObj = new TestLogObject(TimestampUnixMilliseconds, "Hello World!"); postTestLog(logObj, callback, callback); }