【问题标题】:How to send JSON dict in POST request?如何在 POST 请求中发送 JSON 字典?
【发布时间】:2016-01-23 20:33:49
【问题描述】:

我有这个 JSON 字典:

{"userId":"363008505", "userName":"almogsh11", "friends":[{"u":"2079823612","n":"she43"},{"u":"2010211025","n":"temy63c"}]}

它包含“朋友”数组。我想在 post http 请求中将此字典发送到服务器。 我该怎么做?

【问题讨论】:

    标签: objective-c json http-post nsarray httprequest


    【解决方案1】:

    您可以使用AFNetworking 框架。您可以使用几种方法,例如JSON Parameter EncodingURL Form Parameter Encoding

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-10-03
      • 2021-01-10
      • 2018-02-07
      相关资源
      最近更新 更多