Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var baseAddress = new Uri("https://steamcommunity.com");
- var cookieContainer = new CookieContainer();
- using (var handler = new HttpClientHandler() { CookieContainer = cookieContainer })
- using (httpClient = new HttpClient(handler) { BaseAddress = baseAddress })
- {
- cookieContainer.Add(baseAddress, new Cookie("steamLoginSecure", "123"));
- HttpResponseMessage response = await httpClient.GetAsync("/market/pricehistory/?country=DE¤cy=3&appid=440&market_hash_name=Specialized%20Killstreak%20Brass%20Beast");
- if (response.IsSuccessStatusCode)
- {
- data = await response.Content.ReadAsStringAsync();
- }
- else
- {
- throw new Exception(response.ReasonPhrase);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement