Пример #1
0
        public void SimpleCallTest()
        {
            var auth = new NullAuthenticator();
            var webRequest = auth.CreateHttpWebRequest("GET", new Uri("https://www.google.com"));

            Assert.IsNotNull(webRequest);
        }
Пример #2
0
        public void SimpleCallTest()
        {
            var auth = new NullAuthenticator();
            var webRequest = new HttpRequestFactory().Create(new Uri("https://www.google.com"), "GET");
            auth.ApplyAuthenticationToRequest(webRequest);

            Assert.IsNotNull(webRequest);
            Assert.That(webRequest.RequestUri, Is.EqualTo(new Uri("https://www.google.com")));
            Assert.That(webRequest.Method, Is.EqualTo("GET"));
        }
Пример #3
0
        public Request()
        {
            applicationName = Utilities.GetAssemblyTitle() ?? "Unknown_Application";
            Authenticator = new NullAuthenticator();

            MaximumRetries = 3;
            RetryWaitTimeIncreaseFactor = 2.0;
            RetryInitialWaitTime = 1000;
        }
Пример #4
0
        public Request()
        {
            applicationName = Utilities.GetAssemblyTitle() ?? "Unknown_Application";
            Authenticator = new NullAuthenticator();
            WebRequestFactory = new HttpRequestFactory();
            Parameters = new ParameterCollection();

            MaximumRetries = 3;
            RetryWaitTimeIncreaseFactor = 2.0;
            RetryInitialWaitTime = 1000;
        }