Problem with WinRT HttpClient

I have a problem that drives me crazy. I searched for a watch for an answer without any luck. I am developing a WINRT / Windows Phone 8.1 application where I call a RESTful web service from the following code:

HttpClient httpClient = new HttpClient();
HttpResponseMessage response = await httpClient.GetAsync(new Uri("my_secret_uri"));
string data = await response.Content.ReadAsStringAsync();
MessageDialog dialog = new MessageDialog(data);
await dialog.ShowAsync();

This works fine and returns the correct data. Then I do the following:

  • Going from a page displaying data.
  • Manually change some data in the Webservice database
  • Go to the page

Now I expect it to pull out the new data, which I changed in step 2, but still returns the original data. If I find "my_secret_uri" in a web browser, it displays the changed data correctly. If I stop the application and start it again, it will also display the changed data correctly.

It is as if the data that was originally pulled is cached while the application is running.

, ?

+4
1

Windows Phone -. , Uri , .

:

  • ( : no-cache ..).
  • .
+2

All Articles