public Post ( |
||
inputs | 전송 데이타 | |
enc | 인코딩 방식 | |
Результат | string |
public void HttpPost() { foreach(string script in ScriptPaths) { var http = new HttpClient(script); log.Debug("Post(string) = " + http.Post(PayLoad, Encoding.UTF8)); log.Debug("Post(string) = " + http.Post(PayLoad, Encoding.Default)); var nvc = new NameValueCollection { { "A", "123" }, { "B", "가나다" }, { "CD", "각하" }, { "Name", "바보 아냐" } }; log.Debug("Post(NameValueCollection inputs) = " + http.Post(nvc, Encoding.UTF8)); log.Debug("Post(NameValueCollection inputs) = " + http.Post(nvc, Encoding.Default)); log.Debug(""); } }
public void HttpPost2() { var list = new NameValueCollection { { "postparam", "리얼웹 가나다 ABC 123 & _ -" } }; var http = new HttpClient(Echo2); var result = http.Post(list, Encoding.Default); Assert.IsNotEmpty(result); if(IsDebugEnabled) log.Debug(result.EllipsisChar(80)); }