From 18ffe7eeaab8b2b328009edc0a5e536793d36527 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 15 Jan 2019 21:42:47 +0000 Subject: [PATCH] --- FormCustom/FormCustom.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/FormCustom/FormCustom.cs b/FormCustom/FormCustom.cs index 77e9cc6..7a70048 100644 --- a/FormCustom/FormCustom.cs +++ b/FormCustom/FormCustom.cs @@ -66,8 +66,21 @@ namespace raven_integration a = await Util.PostAsync("FormCustom", await Util.GetTokenAsync("BizAdminFull"), d.ToString()); Util.ValidateDataReturnResponseOk(a); } + + //check the concurrency token cache scheme + uint token = a.ObjectResponse["data"]["concurrencyToken"].Value(); + //This should return a 304 not modified + a = await Util.GetAsync($"FormCustom/widget?concurrencyToken={token}", await Util.GetTokenAsync("BizAdminFull")); + Util.ValidateHTTPStatusCode(a,304); + + //and this should return the whole object + token = token--;//make the token not match + //This should return a 200 and the whole object + a = await Util.GetAsync($"FormCustom/widget?concurrencyToken={token}", await Util.GetTokenAsync("BizAdminFull")); + Util.ValidateDataReturnResponseOk(a); } + ///