Пример #1
0
 public RestClient(string apiKey, bool allowAllSslCertificates, ProxyConfiguration proxyConfiguration)
     : this(apiKey, allowAllSslCertificates, proxyConfiguration, new Dictionary <string, string>())
 {
 }
Пример #2
0
 public AuthenticationService(string webpageUrl, ProxyConfiguration proxyConfiguration)
 {
     client = new UnauthenticatedRestClient(proxyConfiguration);
     authenticationTemplate = new UrlTemplate(webpageUrl + UrlTemplate.ESL_AUTHENTICATION_PATH);
     webpageTemplate        = new UrlTemplate(webpageUrl);
 }
Пример #3
0
        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;
        }
Пример #4
0
 public RestClient(string apiKey, ProxyConfiguration proxyConfiguration)
     : this(apiKey, false, proxyConfiguration)
 {
 }
Пример #5
0
 public OssClient(string apiKey, string baseUrl, bool allowAllSSLCertificates,
                  ProxyConfiguration proxyConfiguration)
     : this(apiKey, baseUrl, allowAllSSLCertificates, proxyConfiguration, new Dictionary <string, string>())
 {
 }
Пример #6
0
 public OssClient(string apiKey, string baseUrl, ProxyConfiguration proxyConfiguration)
     : this(apiKey, baseUrl, false, proxyConfiguration)
 {
 }
Пример #7
0
        public OssClient(ApiTokenConfig apiTokenConfig, string baseUrl, bool allowAllSSLCertificates, ProxyConfiguration proxyConfiguration, IDictionary <string, string> headers)
        {
            Asserts.NotNull(apiTokenConfig, "apiTokenConfig");
            Asserts.NotEmptyOrNull(baseUrl, "baseUrl");
            SetBaseUrl(baseUrl);
            SetWebpageUrl(baseUrl);

            configureJsonSerializationSettings();

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

            init(restClient, "");
        }
Пример #8
0
 public RestClient(string apiToken, Boolean allowAllSSLCertificates, ProxyConfiguration proxyConfiguration)
     : this(apiToken, allowAllSSLCertificates, proxyConfiguration, new Dictionary <string, string> ())
 {
 }
Пример #9
0
 public UnauthenticatedRestClient(ProxyConfiguration proxyConfiguration)
 {
     this.proxyConfiguration = proxyConfiguration;
 }