コード例 #1
0
ファイル: HTTPRequest.cs プロジェクト: narcitymedia/enjent
 public EnjentHTTPRequest(string url, EnjentHTTPMethod method, Dictionary <string, string> headers)
 {
     this.URL         = url;
     this.Methods     = method;
     this.Headers     = headers;
     this.QueryString = new NameValueCollection(0);
 }
コード例 #2
0
ファイル: HTTPRequest.cs プロジェクト: narcitymedia/enjent
        public EnjentHTTPRequest(string url, EnjentHTTPMethod method, Dictionary <string, byte[]> headers)
        {
            this.URL         = url;
            this.Methods     = method;
            this.QueryString = new NameValueCollection(0);

            Dictionary <string, string> mappedHeaders = new Dictionary <string, string>(headers.Count);

            foreach (KeyValuePair <string, byte[]> header in headers)
            {
                mappedHeaders.Add(header.Key, System.Text.Encoding.Default.GetString(header.Value).Trim());
            }

            this.Headers = mappedHeaders;
        }
コード例 #3
0
ファイル: HTTPRequest.cs プロジェクト: narcitymedia/enjent
 public EnjentHTTPRequest(string url, EnjentHTTPMethod method, Dictionary <string, byte[]> headers, NameValueCollection queryString) : this(url, method, headers)
 {
     this.QueryString = queryString;
 }