2012-05-07 6 views
0

를 전송하는 코드입니다 :Webclient.UploadString()는 여기에 빈 문자열

var client = new WebClient(); 
client.BaseAddress = "http://localhost/"; 
client.Headers["Content-type"] = "application/x-www-form-urlencoded"; 
client.Proxy = null; 
// The server gets the data 
var responseStr = client.UploadString(url, data); 
... 
// The server gets an empty post data 
responseStr = client.UploadString(url, data); 

는 Webclient에이 처분 할 수있는 일이 될 예정인가요?

+0

은'data' 변수의 내용을 무엇입니까? –

+0

키 쌍 : json = foo & checksum = sha1 (foo). 나는 그것이 중요하지 않다고 생각한다. – user1379654

+0

실제로 인코딩하지 않으면 서버에서 디코딩 할 수 없으므로 실제로 중요합니다. –

답변

0

흠 유 이것을 시도하지 못할 수 있습니다 :

WebClient client = new WebClient(); 
client.BaseAddress = "http://localhost/something.php";