Beispiel #1
0
        public void op_ToString()
        {
            const string expected = "HTTP/1.0";
            var actual = new HttpVersion(1, 0).ToString();

            Assert.Equal(expected, actual);
        }
Beispiel #2
0
        public void op_FromString_string()
        {
            var expected = new HttpVersion(1, 0);
            var actual = HttpVersion.FromString("HTTP/1.0");

            Assert.Equal(expected, actual);
        }
Beispiel #3
0
        public void opImplicit_HttpVersion_string()
        {
            var expected = new HttpVersion(1, 0);
            HttpVersion actual = "HTTP/1.0";

            Assert.Equal(expected, actual);
        }
Beispiel #4
0
        public void opImplicit_string_HttpVersion()
        {
            const string expected = "HTTP/1.0";
            string actual = new HttpVersion(1, 0);

            Assert.Equal(expected, actual);
        }
Beispiel #5
0
 public StatusLine(HttpVersion version, 
                   int code, 
                   string reason)
     : this()
 {
     Version = version;
     Code = code;
     Reason = reason;
 }
Beispiel #6
0
 public RequestLine(string method, 
                    string requestUri, 
                    HttpVersion version)
     : this()
 {
     Method = method;
     RequestUri = requestUri;
     Version = version;
 }
Beispiel #7
0
        public HttpRequestLine(Token method,
                               AbsoluteUri requestUri,
                               HttpVersion version)
            : this()
        {
            if (null == method)
            {
                throw new ArgumentNullException("method");
            }

            if (null == requestUri)
            {
                throw new ArgumentNullException("requestUri");
            }

            if (null == version)
            {
                throw new ArgumentNullException("version");
            }

            Method = method;
            RequestUri = requestUri;
            Version = version;
        }