티스토리 뷰
public static string postXMLHTTP(string sURL, string sParam, string requestType)
{
string contentType = string.Empty;
if (requestType.Equals("UTF-8"))
contentType = "text/xml;charset=UTF-8";
else
postXMLHTTP(sURL, sParam);
try
{
HttpWebRequest HttpRequest = (HttpWebRequest)WebRequest.Create(sURL);
HttpRequest.Method = "POST";
string postData = sParam;
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
byte[] PostValue = Encoding.UTF8.GetBytes(postData);
// Set the content type of the data being posted.
//HttpRequest.ContentType = "application/x-www-form-urlencoded";
HttpRequest.ContentType = "text/xml;charset=UTF-8";
HttpRequest.ContentLength = PostValue.Length;
Stream dataStream = HttpRequest.GetRequestStream();
dataStream.Write(PostValue, 0, PostValue.Length);
dataStream.Close();
HttpWebResponse HttpResponse = (HttpWebResponse)HttpRequest.GetResponse();
Stream respPostStream = HttpResponse.GetResponseStream();
StreamReader respReader = new StreamReader(respPostStream, Encoding.UTF8);
string strResponse = respReader.ReadToEnd();
HttpResponse.Close();
respReader.Close();
return strResponse;
}
catch (Exception ex)
{
return "ExceptionError : " + ex.Message;
}
}
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 아이폰 보조배터리
- 릴리스다이어리
- 아이팟 보조배터리
- 닷넷 파일형식
- .NET Excel
- 로네펠트
- 아이폰 셀카
- God of War III
- 나를 기억하고 있는 너에게
- IT·컴퓨터
- 아이폰 카메라어플
- 켄우드 정수기
- 모토스톰2
- KL-2200
- 닷넷 엑셀
- 안녕 바다
- KL2200
- hot 6
- 보이스차
- 윈터드림
- GTO SHONAN 14DAYS
- 보이스티
- georgia max
- 아이튠즈 없이 mp3가져오기
- Roibosh Vanilla
- Lily's Diary
- 릴리스 다이어리 - 설레어
- 러브트리프로젝트
- 삼성 외장하드
- Crows Zero
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함