【问题标题】:HttpPost in windows 8 Store XAML/C#Windows 8 中的 HttpPost 存储 XAML/C#
【发布时间】:2013-03-19 22:22:59
【问题描述】:

我为 android 开发了一个向服务器发送请求的应用程序,我在 Android 中的代码如下:

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 应用商店应用程序中的工作方式。

非常感谢您的帮助。

最好的问候。

【问题讨论】:

    标签: c# android windows windows-8


    【解决方案1】:

    resources for Android --> Windows Store apps,包括API mapping index。这是article on how to use it

    此外,还有一个名为 Generation App 的程序可帮助您按照指导学习路径构建您的第一个应用程序。它还使您可以免费获得技术支持和免费设计咨询(Microsoft 员工不符合条件;我本来希望对我的应用程序进行免费设计咨询!),并且偶尔会有提交应用程序的赠品。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-27
      • 2012-08-27
      • 1970-01-01
      • 1970-01-01
      • 2012-08-15
      • 1970-01-01
      相关资源
      最近更新 更多