嗨!我正在从 wp7 向 php 发送请求。当 php 发送响应时,WP7 应用程序收到的响应包含大量空白字符和换行符。
这是我的 WP7 响应回调:
void GetResponseCallback(IAsyncResult asynchronousResult)
{
try
{
HttpWebRequest request = asynchronousResult.AsyncState as HttpWebRequest;
HttpWebResponse response = request.EndGetResponse(asynchronousResult) as HttpWebResponse;
using (StreamReader sr = new StreamReader(response.GetResponseStream()))
{
string responseText = sr.ReadToEnd();
Debug.WriteLine(responseText);
SaveResponseText(responseText);
}
}
catch (WebException e)
{
}
}
这是我的 php 代码详细信息:
if ($_POST["event"] == "riaszt")
{
if($count != 0)
{
{
echo ok;
}
}
}