예제 #1
0
파일: WebHelper.cs 프로젝트: szm7410/SNData
        public Task <SNHttpWebResponse> PostRequestAsync(string serviceUrl, Dictionary <string, string> headers = null, string postData = "", string contentType = "")
        {
            Task <SNHttpWebResponse> postResult = new Task <SNHttpWebResponse>(() => {
                SNHttpWebResponse response = CommonHttpRequest(serviceUrl, WebRequestMethods.Http.Post, headers, postData, contentType);
                return(response);
            });

            postResult.Start();
            return(postResult);
        }
예제 #2
0
파일: WebHelper.cs 프로젝트: szm7410/SNData
        public Task <SNHttpWebResponse> GetRequestAsync(string serviceUrl, Dictionary <string, string> headers = null)
        {
            Task <SNHttpWebResponse> getResult = new Task <SNHttpWebResponse>(() => {
                SNHttpWebResponse response = CommonHttpRequest(serviceUrl, WebRequestMethods.Http.Get, headers);
                return(response);
            });

            getResult.Start();
            return(getResult);
        }