/// <summary>
        /// Initializes a new instance of <see cref="DocuSignClient"/> with the provided
        /// API base path and pre-configured <see cref="IHttpClient"/> object
        /// </summary>
        /// <param name="apiBase"></param>
        /// <param name="client"></param>
        public DocuSignClient(string apiBase, IHttpClient client)
        {
            string baseUrl = string.IsNullOrEmpty(apiBase) ? Production_REST_BasePath : apiBase;

            Configuration = new Configuration(baseUrl);

            SetBasePath(baseUrl);
            SetOAuthBasePath();

            RestClient = client;
            RestClient.AddDefaultRequestHeader("User-Agent", Configuration.UserAgent);
        }
示例#2
0
        public LoqateServicesClient(IHttpClient httpClient)
        {
            this.httpClient = httpClient;

            httpClient.AddDefaultRequestHeader("Accept", "application/json");
        }