我想用MSDN的代碼,但的GetResponse()不工作後與HttpWebRequest的數據。getrequeststream中的Windows Phone 8
System.net.httpwebrequest does not contain a definition for getrequeststream
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.getresponse.aspx
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Net;
using System.Windows;
using System.Windows.Controls;
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create("http://d.co/login.php");
myReq.Method = "POST";
myReq.ContentType = "application/json";
Stream dataStream = (HttpWebResponse)myReq.GetRequestStream();
你能在「不工作」的詳細點嗎?發佈您的錯誤消息,以便我們可以有一個更好的主意。而在你的'usings'的情況下是不正確的 –
System.net.httpwebrequest不包含getrequeststream定義,它使用都OK – user3529738
你瞄準什麼平臺?你可能在Windows Phone上? –