title: How to use credentials in HttpClient in c#?
body: <p>I am facing some problems when using the HttpClient class to access to a Delicious API. I have the following code:</p>
  
  <pre><code>try
  {
      const string uriSources = "https://api.del.icio.us/v1/tags/bundles/all?private={myKey}";
      using (var handler = new HttpClientHandler { Credentials = new  
                               NetworkCredential("MyUSER", "MyPASS") })
      {
           using (var client = new HttpClient(handler))
           {
               var result = await client.GetStringAsync(uriSources);
           }
     }
  }
  catch (Exception ex)
  {
      MessageBox.Show(ex.Message, "ERROR...", MessageBoxButton.OK);
  }
  </code></pre>
  
  <p>When running the code above I am getting the following: Response status code does not indicate success: 401 (Unauthorized).</p>
  
  <p>So, how could I get this work? Is it possible?</p>
  
  <p>Thanks in advance</p>
  
  <p>Regards!</p>