ToString() public method

Returns a string that represents the current WebHeaderCollection.
public ToString ( ) : string
return string
Ejemplo n.º 1
0
        public override string ToString()
        {
            StringBuilder stringBuilder = new StringBuilder(64);

            stringBuilder.AppendFormat("{0} {1} HTTP/{2}\r\n", _method, _uri, _version);
            stringBuilder.Append(_headers.ToString());
            return(stringBuilder.ToString());
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns a <see cref="string"/> that represents the current
        /// <see cref="HttpListenerRequest"/>.
        /// </summary>
        /// <returns>
        /// A <see cref="string"/> that represents the current <see cref="HttpListenerRequest"/>.
        /// </returns>
        public override string ToString()
        {
            var output = new StringBuilder(64);

            output.AppendFormat("{0} {1} HTTP/{2}\r\n", _method, _uri, _version);
            output.Append(_headers.ToString());

            return(output.ToString());
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Returns a <see cref="string"/> that represents
        /// the current <see cref="HttpListenerRequest"/>.
        /// </summary>
        /// <returns>
        /// A <see cref="string"/> that represents the current <see cref="HttpListenerRequest"/>.
        /// </returns>
        public override string ToString()
        {
            var buff = new StringBuilder(64);

            buff.AppendFormat("{0} {1} HTTP/{2}\r\n", _httpMethod, _rawUrl, _protocolVersion);
            buff.Append(_headers.ToString());

            return(buff.ToString());
        }