ToString() public méthode

Returns a string that represents the current WebHeaderCollection.
public ToString ( ) : string
Résultat string
        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());
        }
Exemple #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());
        }
Exemple #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());
        }