Beispiel #1
0
        protected ResponseInfo PostRequest(string uri, string data, string contentType)
        {
            Net.SuperWebClient wc = new Net.SuperWebClient();
            wc.Headers = new System.Net.WebHeaderCollection();
            wc.Headers.Add("Content-Type", contentType);

            string result = wc.UploadString(new Uri(uri), "POST", data);

            return(new ResponseInfo(wc.StatusCode, wc.StatusDescription, result));
        }
Beispiel #2
0
        protected ResponseInfo PostRequest(string uri, string data, string contentType)
        {
            Net.SuperWebClient wc = new Net.SuperWebClient();
            wc.Headers = new System.Net.WebHeaderCollection();
            wc.Headers.Add("Content-Type", contentType);

            string result = wc.UploadString(new Uri(uri), "POST", data);

            return new ResponseInfo(wc.StatusCode, wc.StatusDescription, result);
        }