Это может быть сложной проблемой, но я не могу отформатировать пост webrequest/response для получения данных из Wikipedia API. Я отправил свой код ниже, если кто-нибудь может помочь мне увидеть мою проблему.
    string pgTitle = txtPageTitle.Text;
    Uri address = new Uri("http://en.wikipedia.org/w/api.php");
    HttpWebRequest request = WebRequest.Create(address) as HttpWebRequest;
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    string action = "query";
    string query = pgTitle;
    StringBuilder data = new StringBuilder();
    data.Append("action=" + HttpUtility.UrlEncode(action));
    data.Append("&query=" + HttpUtility.UrlEncode(query));
    byte[] byteData = UTF8Encoding.UTF8.GetBytes(data.ToString());
    request.ContentLength = byteData.Length;
    using (Stream postStream = request.GetRequestStream())
    {
        postStream.Write(byteData, 0, byteData.Length);
    }
    using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
    {
        // Get the response stream.
        StreamReader reader = new StreamReader(response.GetResponseStream());
        divWikiData.InnerText = reader.ReadToEnd();
    }
