コード例 #1
0
 public void Initialize(HttpResponseHeaders headers)
 {
     EncodingSelector   = headers.EncodingSelector;
     _headersEnumerator = headers.GetEnumerator();
     _headersType       = HeadersType.Headers;
     _hasMultipleValues = false;
 }
コード例 #2
0
        public void Initialize(HttpResponseHeaders headers)
        {
            _headersEnumerator  = headers.GetEnumerator();
            _trailersEnumerator = default;
            _genericEnumerator  = null;
            _isTrailers         = false;

            _stringValuesEnumerator = default;
            Current = default;
        }
コード例 #3
0
        public static Dictionary <string, string> ConvertHeaders(HttpResponseHeaders headers)
        {
            var result     = new Dictionary <string, string>();
            var enumerator = headers.GetEnumerator();

            foreach (var item in headers)
            {
                result.Add(TeaConverter.StrToLower(item.Key), item.Value.First());
            }
            return(result);
        }