@@ -59,7 +59,7 @@ HttpClient allows to inject a custom http handler. In the follwing example, we i
59
59
``` C#
60
60
static void Main (string [] args )
61
61
{
62
- const string url = " http://worldclockapi.com /api/json/utc/now " ;
62
+ const string url = " http://worldtimeapi.org /api/timezone/Europe/Zurich " ;
63
63
64
64
var httpClientHandler = new HttpClientHandler ();
65
65
var cacheExpirationPerHttpResponseCode = CacheExpirationProvider .CreateSimple (TimeSpan .FromSeconds (60 ), TimeSpan .FromSeconds (10 ), TimeSpan .FromSeconds (5 ));
@@ -96,11 +96,11 @@ static void Main(string[] args)
96
96
97
97
Console output:
98
98
```
99
- Attempt 1: HTTP GET http://worldclockapi.com /api/json/utc/now ... completed in 625ms
100
- Attempt 2: HTTP GET http://worldclockapi.com /api/json/utc/now ... completed in 48ms
101
- Attempt 3: HTTP GET http://worldclockapi.com /api/json/utc/now ... completed in 1ms
102
- Attempt 4: HTTP GET http://worldclockapi.com /api/json/utc/now ... completed in 1ms
103
- Attempt 5: HTTP GET http://worldclockapi.com /api/json/utc/now ... completed in 1ms
99
+ Attempt 1: HTTP GET http://worldtimeapi.org /api/timezone/Europe/Zurich ... completed in 625ms
100
+ Attempt 2: HTTP GET http://worldtimeapi.org /api/timezone/Europe/Zurich ... completed in 48ms
101
+ Attempt 3: HTTP GET http://worldtimeapi.org /api/timezone/Europe/Zurich ... completed in 1ms
102
+ Attempt 4: HTTP GET http://worldtimeapi.org /api/timezone/Europe/Zurich ... completed in 1ms
103
+ Attempt 5: HTTP GET http://worldtimeapi.org /api/timezone/Europe/Zurich ... completed in 1ms
104
104
105
105
TotalRequests: 5
106
106
-> CacheHit: 4
@@ -118,7 +118,7 @@ with InMemoryCacheHandler.
118
118
``` C#
119
119
static void Main (string [] args )
120
120
{
121
- const string url = " http://worldclockapi.com /api/json/utc/now " ;
121
+ const string url = " http://worldtimeapi.org /api/timezone/Europe/Zurich " ;
122
122
123
123
var httpClientHandler = new HttpClientHandler ();
124
124
var cacheExpirationPerHttpResponseCode = CacheExpirationProvider .CreateSimple (TimeSpan .FromSeconds (60 ), TimeSpan .FromSeconds (10 ), TimeSpan .FromSeconds (5 ));
0 commit comments