/// <summary> /// Sets the default client settings needed by GET and POST request methods. /// </summary> /// <param name="client">HttpClient instance.</param> /// <remarks>>Does not handle the If-Match header.</remarks> private void Settings(HttpClient client) { client.BaseAddress = BaseAddress; client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); if (BasicAuthenticator != null) { client.DefaultRequestHeaders.Authorization = BasicAuthenticator.AuthenticationHeader(); } }
public EveClient(Uri baseAddress, BasicAuthenticator authenticator) : this(baseAddress) { BasicAuthenticator = authenticator; }