SHARE
TWEET

Untitled




Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- var client = new HttpClient();
- var response = await client.GetAsync(uri);
- string sample;
- IEnumerable<string> values;
- if (response.Content.Headers.TryGetValues("Sample-Header", out values))
- {
- // This never happens!
- sample = values.First();
- }
- var client = new HttpClient();
- var response = await client.GetAsync(uri);
- string sample;
- IEnumerable<string> values;
- if (response.Headers.TryGetValues("Sample-Header", out values))
- {
- // This happens!
- sample = values.First();
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.