title: Downloading a string asynchronously, UI freezes briefly
body: <p>I'm writing an Xamarin.Forms app and I'm having some trouble making a request using async. The freezes temporarily when the network request is made when it really shouldn't. What am I doing wrong?</p>
  
  <pre><code>public RecipesView LatestRecipes
      (string searchTerm, long? fromTimestamp, int recordsPerPage, bool hasMoreRecords)
      {
          HttpClientHandler handler = new HttpClientHandler();
          handler.CookieContainer = Settings.cookies;
  
          string url = Settings.Default.baseUrl + "/Api/recipes/latest";
          Dictionary&lt;string, string&gt; queryString = new Dictionary&lt;string, string&gt; ();
          queryString.Add ("maxRecords", recordsPerPage.ToString());
          queryString.Add ("searchTerm", searchTerm);
          queryString.Add ("username", "");
          queryString.Add ("boardSlug", "");
          queryString.Add ("type", "json");
  
          string queryUrl = url + ToQueryString(queryString);
  
          string result = DownloadString (queryUrl, handler).Result;
  
          RecipesView view = JsonConvert.DeserializeObject&lt;RecipesView&gt; (result);
          hasMoreRecords = view.HasMoreRecords;
  
          foreach (RecipeModel model in view.Records) {
              model.OriginalImageWidth = model.ImageWidth;
              model.OriginalImageHeight = model.ImageHeight;
          }
  
          return view;
  
      }
  
      public async Task&lt;string&gt; DownloadString(string url, HttpClientHandler handler)
      {
          var httpClient = new HttpClient(handler); // Xamarin supports HttpClient!
  
          Task&lt;string&gt; contentsTask = httpClient.GetStringAsync(url); // async method!
  
          // await! control returns to the caller and the task continues to run on another thread
          string contents = await contentsTask;
  
          return contents; // Task&lt;TResult&gt; returns an object of type TResult, in this case int
      }
  </code></pre>
  
  <p>Thanks,
  Colin.</p>