예제 #1
0
 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);
         }
     }
                   );
 }
예제 #2
0
    public void WriteTestMessage()
    {
        TestLogObject logObj = new TestLogObject(TimestampUnixMilliseconds, "Hello World!");

        postTestLog(logObj, callback, callback);
    }