S
Sam
Hi All,
I have to send XML string to a remote site app, say,
https://blah.blah.com/xmlproc.cgi. I am using the following code:
private string SendRequest(string sRequest)
{
WebClient oWc = new WebClient();
oWc.Headers.Add("Content-Type","application/x-www-form-urlencoded");
byte[] bReq = Encoding.ASCII.GetBytes(sRequest);
byte[] bRsp = oWc.UploadData("https://blah.blah.com/xmlproc.cgi", "POST",
bReq);
return Encoding.ASCII.GetString(bRsp);
}
But the site always responds with "No XML Passed" in it's response. The site
works for sure as I have a test app (no source) that can send the same XML
and get a valid response. What am I missing?
Thanks in advance
Sam
I have to send XML string to a remote site app, say,
https://blah.blah.com/xmlproc.cgi. I am using the following code:
private string SendRequest(string sRequest)
{
WebClient oWc = new WebClient();
oWc.Headers.Add("Content-Type","application/x-www-form-urlencoded");
byte[] bReq = Encoding.ASCII.GetBytes(sRequest);
byte[] bRsp = oWc.UploadData("https://blah.blah.com/xmlproc.cgi", "POST",
bReq);
return Encoding.ASCII.GetString(bRsp);
}
But the site always responds with "No XML Passed" in it's response. The site
works for sure as I have a test app (no source) that can send the same XML
and get a valid response. What am I missing?
Thanks in advance
Sam