How to reset settings in c# httpClient?
Clash Royale CLAN TAG #URR8PPP How to reset settings in c# httpClient? In c#, I make get and post requests. This is my code GET private async Task<string> GetAsync(string uri, Token token, string accept, string content_type) HttpClient client = new HttpClient(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue(accept)); // ACCEPT header bool added = client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "text/xml"); if (token != null) client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(token.token_type, token.access_token); HttpResponseMessage g = await client.GetAsync(uri); if (g.IsSuccessStatusCode) return await g.Content.ReadAsStringAsync(); else errors.AddError(g.ReasonPhrase, await g.Content.ReadAsStringAsync()); return null; } POST private async Task<string> PostAsync(string uri, Token token, string postData, string accept, string content_type) HttpClient client = ne...