You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using below code to connect. But we are not sure where to add proxy settings. Can you please help ?
public void Initialise(HttpMessageHandler messageHandler = null, HttpClient httpClient =
null)
{
var username = _faxConfiguration.UserName;
var password = _faxConfiguration.Password;
if (string.IsNullOrEmpty(username))
throw new ArgumentException($"{username} has not been set.");
if (string.IsNullOrEmpty(password))
throw new ArgumentException($"{password} has not been set.");
Account = new Account(this);
Inbound = new Inbound(this);
Outbound = new Outbound(this);
Documents = new Documents(this);
HttpClient = messageHandler == null ? new HttpClient() : new HttpClient(messageHandler);
HttpClient = httpClient ?? HttpClient;
HttpClient.BaseAddress = new Uri($"https://rest.interfax.net/");
HttpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
HttpClient.DefaultRequestHeaders.Add("Authorization",
new List<string> { $"Basic {Utils.Base64Encode($"{username}:{password}")}" });
JsonConvert.DefaultSettings = () =>
{
var settings = new JsonSerializerSettings();
settings.Converters.Add(new StringEnumConverter { CamelCaseText = true });
return settings;
};
}
The text was updated successfully, but these errors were encountered:
We are using below code to connect. But we are not sure where to add proxy settings. Can you please help ?
The text was updated successfully, but these errors were encountered: