Environment:
VS2012 Update 4
Windows Phone 8 SDK
new new Windows Phone project based on WP OS 7.1
NuGet pack1: MS Async
NuGet pack2: MS HttpClient
What the project does is
one test for the forum API:
to post a new topic on the forum and update JSON to check if the "score" is accumulating.
What the user interface means

1st text block:
json response will display here
3 :
[ JSON]: API1
[ ]: API2 ,
[IE]: json IE, API1
:
, , [New Post]
JSON
2
count: 244 --- >
"57923" --- > 1- ( "" )
1.
2. [ JSON],
3. "" "" 1-
4. [New Post], ,
5. [ JSON],
6. : "" 1, "title" ,
:
1. [New Post], , [ JSON], !
2. URL- Chrome (Desktop), , JSON !
3. , [ JSON], JSON , , ,
?
private async void RefreshJSONButton_Click(object sender, RoutedEventArgs e)
{
this.JsonView.Text = string.Empty;
HttpClient client = new HttpClient();
string url =
"API1 Address Here";
string x = await client.GetStringAsync(url);
this.JsonView.Text = x;
client.Dispose();
}
private async void NewPostButton_Click_1(object sender, RoutedEventArgs e)
{
Random rnd = new Random();
this.num = rnd.Next(1, 99999);
string threadTitle = this.num.ToString();
string threadContent = "111" + num.ToString();
string url =
"API2 Address Here";
url = url + "&title=" + threadTitle + "&content=" + threadContent;
HttpClient client = new HttpClient();
string x = await client.GetStringAsync(url);
client.Dispose();
this.titleView.Text = threadTitle;
this.contentView.Text = threadContent;
}