Exemple #1
0
        private void AddHeaderToRequest(HttpRequest request, string headerLine)
        {
            var hp = headerLine.Split(new[] { ':' }, 2);
            var hn = hp[0].Trim();
            var hv = hp.Length == 2 ? hp[1].Trim() : string.Empty;

            request.AddHeader(hn, hv);
        }
Exemple #2
0
        private void AddHeaderToRequest(HttpRequest request, string headerLine)
        {
            var headerParts = headerLine.Split(new[] { ':' }, 2);
            var headerName  = headerParts[0].Trim();
            var headerValue = headerParts.Length == 2 ? headerParts[1].Trim() : string.Empty;

            request.AddHeader(headerName, headerValue);
        }
Exemple #3
0
 private void AddHeaderToRequest(HttpRequest request, string headerLine)
 {
     string[] hp = headerLine.Split(new[] { ':' }, 2);
     string hn = hp[0].Trim();
     string hv = hp.Length == 2 ? hp[1].Trim() : string.Empty;
     request.AddHeader(hn, hv);
 }