Beispiel #1
0
 public HttpWebRequestOption(string uri,
                             HttpWebHeaderContent headContent = null,
                             HttpMethod method           = HttpMethod.POST,
                             HttpContentType contentType = HttpContentType.JSON)
     : this(uri, headContent, DEFAULT_ENCODING, method, contentType)
 {
 }
Beispiel #2
0
        public HttpWebRequestOption(string uri, HttpWebHeaderContent headContent,
                                    Encoding encoding, HttpMethod method = HttpMethod.POST,
                                    HttpContentType contentType          = HttpContentType.JSON)
        {
            this.Uri = uri;

            this.HttpMethod = method;

            this.HeadContent = headContent;

            this.ContentType = contentType;

            if (encoding == null)
            {
                this.Encoding = DEFAULT_ENCODING;
            }
            else
            {
                this.Encoding = encoding;
            }
        }