回答編集履歴
1
UWPアプリ用の記述を追記
answer
CHANGED
@@ -14,4 +14,19 @@
|
|
14
14
|
```
|
15
15
|
|
16
16
|
□参考情報
|
17
|
-
[ネットワークのトレースを行う](https://dobon.net/vb/dotnet/programing/networktrace.html)
|
17
|
+
[ネットワークのトレースを行う](https://dobon.net/vb/dotnet/programing/networktrace.html)
|
18
|
+
|
19
|
+
---
|
20
|
+
2017/12/20コメント欄のやり取りを元に追記。
|
21
|
+
HttpClientのキャッシュを無効化する、UWPアプリ用のソースコード。
|
22
|
+
```C#
|
23
|
+
using Windows.Web.Http.Filters;
|
24
|
+
|
25
|
+
HttpBaseProtocolFilter filter = new HttpBaseProtocolFilter();
|
26
|
+
filter.CacheControl.ReadBehavior = HttpCacheReadBehavior.NoCache;
|
27
|
+
filter.CacheControl.WriteBehavior = HttpCacheWriteBehavior.Default;
|
28
|
+
HttpClient client = new HttpClient(filter);
|
29
|
+
```
|
30
|
+
□参考情報
|
31
|
+
[HttpBaseProtocolFilter Class](https://docs.microsoft.com/en-us/uwp/api/windows.web.http.filters.httpbaseprotocolfilter)
|
32
|
+
[UWP - HttpClient in while loop only executed GET once and returns the same string as the first executed value](https://stackoverflow.com/questions/42512901/uwp-httpclient-in-while-loop-only-executed-get-once-and-returns-the-same-strin)
|