/// <inheritdoc />
        public string Format(string format, params object[] args)
        {
            var formatterLogger = new FormatterLogger();

            formatterLogger.Log(Microsoft.Extensions.Logging.LogLevel.None, format, args);
            return(formatterLogger.ToString());
        }
        /// <summary>
        /// Creates an instance with specified formatter for requests and responses
        /// </summary>
        public RestfulServiceClient(MediaTypeFormatter formatter, HttpClient client)
        {
            if (client == null)
            {
                client = new HttpClient();

#if DEBUG
                client.Timeout = new TimeSpan(0, 10, 0); //5 minutes
#else
                client.Timeout = new TimeSpan(0, 2, 0);  //2 minutes
#endif
            }

            _innerClient     = client;
            _formatter       = formatter;
            _formatterLogger = new FormatterLogger();
        }
        /// <summary>
        /// Creates an instance with specified formatter for requests and responses
        /// </summary>
        public RestfulServiceClient(MediaTypeFormatter formatter, HttpClient client)
        {
            ServicePointManager.SecurityProtocol =
                SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; // to enable the services which require TLS 1.1+ (Salesforce, Asana)

            if (client == null)
            {
                client = new HttpClient();

#if DEBUG
                client.Timeout = new TimeSpan(0, 10, 0); //10 minutes
#else
                client.Timeout = new TimeSpan(0, 2, 0);  //2 minutes
#endif
            }

            _innerClient     = client;
            _formatter       = formatter;
            _formatterLogger = new FormatterLogger();
            Signatures       = new List <IRequestSignature>();
        }