Häufig verwendete Methoden
Häufig verwendete Methoden
Häufig verwendete Methoden
Häufig verwendete Methoden
public static HttpClient Create(string username, string password) { var client = new HttpClient() { BaseAddress = new Uri("https://myanimelist.net/") }; var mediaType = new MediaTypeWithQualityHeaderValue("application/xml"); client.DefaultRequestHeaders.Accept.Add(mediaType); client.DefaultRequestHeaders.Add("Authorization", $"Basic {AuthenticationHelper.ConvertToBase64(username, password)}"); return(client); }