【问题标题】:How to Consume JSON as input in PUT and POST method of REST webservice in android?如何在 android 的 REST webservice 的 PUT 和 POST 方法中使用 JSON 作为输入?
【发布时间】:2016-08-04 16:48:03
【问题描述】:

我想在 android 应用程序中使用 rest webservice get 和 post 方法 json 格式。但是我不知道如何从服务器消费和获取数据,请指导我在android平台上获取json数据并将其发布到服务器。

【问题讨论】:

标签: java android json rest android-webservice


【解决方案1】:

在 Android 上最好使用 Retrofit library。看看他们如何轻松完成这项工作。

【讨论】:

    【解决方案2】:

    Google 在其 Android 开发者页面上声明使用 Volley 进行 HTTP 请求。 关于凌空:https://developer.android.com/training/volley/index.html 请求:https://developer.android.com/training/volley/simple.html

    您可以使用本教程来实现您的东西(它提供了更多信息): http://arnab.ch/blog/2013/08/asynchronous-http-requests-in-android-using-volley/

    【讨论】:

      猜你喜欢
      • 2011-04-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-23
      • 1970-01-01
      • 1970-01-01
      • 2015-12-07
      • 2023-03-09
      相关资源
      最近更新 更多