0
我开发了一个应用程序的Android谁发送到服务器的请求,我在Android的代码如下:HttpPost在Windows 8商店XAML/C#
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("www.something.com");
List<NameValuePair> values = new ArrayList<NameValuePair>();
values.add(new BasicNameValuePair("username", user));
values.add(new BasicNameValuePair("password", password));
values.add(new BasicNameValuePair("login-form-type", "pwd"));
httppost.setEntity(new UrlEncodedFormEntity(values, HTTP.UTF_8));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
List<Cookie> cookies = httpclient.getCookieStore().getCookies();
我已经尝试了一些例子,但它似乎是一个即使在Visual Studio 2012中,标准C#代码在Windows应用商店应用中也不能正常工作任何人都可以帮助我理解此代码在Windows 8商店应用中的工作方式。
我真的很赞赏你的帮助。
最好的问候。