I am encountering some problems when using the HttpClient class to access the Delicious API. I have the following 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); }
When I run the code above, I get the following: The response status code does not indicate success: 401 (Unauthorized).
So how could I get this job? Is it possible?
Thank you in advance
Hello!
MikePR Aug 28 '13 at 2:36 on 2013-08-28 02:36
source share