Ejemplo n.º 1
0
        public GameWebRequest(HttpMethod method, string request, Encoding encoding, GameWebMediaHeader header)
        {
            this.method   = method;
            this.request  = request;
            this.encoding = encoding;
            this.header   = header;

            if (!WebUtils.Headers.ContainsKey(header))
            {
                throw new WebRequestException("GameWebMediaHeader not found in dictionary!");
            }
            if (!method.SupportedHttpMethods())
            {
                throw new WebRequestException("HttpMethod not supported!");
            }

            nameValueCollection = new Dictionary <string, string>();
            response            = string.Empty;
        }
Ejemplo n.º 2
0
 public GameWebRequest(HttpMethod method, string request, GameWebMediaHeader header) : this(method, request, Encoding.UTF8, header)
 {
 }