Exemple #1
0
        public EslClient(string apiKey, string baseUrl, bool allowAllSSLCertificates, ProxyConfiguration proxyConfiguration)
        {
            Asserts.NotEmptyOrNull(apiKey, "apiKey");
            Asserts.NotEmptyOrNull(baseUrl, "baseUrl");
            this.baseUrl = AppendServicePath(baseUrl);

            configureJsonSerializationSettings();

            RestClient restClient = new RestClient(apiKey, allowAllSSLCertificates, proxyConfiguration);

            init(restClient, apiKey);
        }
Exemple #2
0
        public EslClient(string apiKey, string baseUrl, bool allowAllSSLCertificates, ProxyConfiguration proxyConfiguration, IDictionary <string, string> headers)
        {
            Asserts.NotEmptyOrNull(apiKey, "apiKey");
            Asserts.NotEmptyOrNull(baseUrl, "baseUrl");
            SetBaseUrl(baseUrl);
            SetWebpageUrl(baseUrl);

            configureJsonSerializationSettings();

            RestClient restClient = new RestClient(apiKey, allowAllSSLCertificates, proxyConfiguration, headers);

            init(restClient, apiKey);
        }
Exemple #3
0
 public EslClient(string apiKey, string baseUrl, ProxyConfiguration proxyConfiguration)
     : this(apiKey, baseUrl, false, proxyConfiguration)
 {
 }
 public AuthenticationService(string webpageUrl, ProxyConfiguration proxyConfiguration)
 {
     client = new UnauthenticatedRestClient(proxyConfiguration);
     authenticationTemplate = new UrlTemplate(webpageUrl + UrlTemplate.ESL_AUTHENTICATION_PATH);
     webpageTemplate        = new UrlTemplate(webpageUrl);
 }
Exemple #5
0
 public EslClient(string apiKey, string baseUrl, bool allowAllSSLCertificates, ProxyConfiguration proxyConfiguration)
     : this(apiKey, baseUrl, allowAllSSLCertificates, proxyConfiguration, new Dictionary <string, string> ())
 {
 }
 public RestClient(string apiToken, Boolean allowAllSSLCertificates, ProxyConfiguration proxyConfiguration)
     : this(apiToken, allowAllSSLCertificates, proxyConfiguration, new Dictionary <string, string> ())
 {
 }
 public RestClient(string apiToken, ProxyConfiguration proxyConfiguration)
     : this(apiToken, false, proxyConfiguration)
 {
 }
 public UnauthenticatedRestClient(ProxyConfiguration proxyConfiguration)
 {
     this.proxyConfiguration = proxyConfiguration;
 }
        public RestClient(ApiTokenConfig apiTokenConfig, Boolean allowAllSSLCertificates, ProxyConfiguration proxyConfiguration, IDictionary <string, string> headers)
        {
            this.allowAllSSLCertificates = allowAllSSLCertificates;
            this.proxyConfiguration      = proxyConfiguration;
            this.additionalHeaders       = headers;

            if (allowAllSSLCertificates)
            {
                System.Net.ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
            }
            HttpMethods.apiTokenConfig = apiTokenConfig;
        }
Exemple #10
0
 public RestClient(string apiToken, Boolean allowAllSSLCertificates, ProxyConfiguration proxyConfiguration)
 {
     this.apiToken = apiToken;
     this.allowAllSSLCertificates = allowAllSSLCertificates;
     this.proxyConfiguration      = proxyConfiguration;
 }