1

在网站中,表单数据使用以下代码使用 HTML 发布请求发布:

<div id="requestinfo">
    <form method="post" action="http://abc/form-post.php" id="request_form">
        <input type="hidden" name="field1" value="value1" />
        <input type="hidden" name="field2" value="value2" />
    </form>
</div>

我怎样才能在 iPhone 中做同样的事情?We do not have to use web services.

4

1 回答 1

1

我建议使用AFNetworking作为处理 HTTP 动词和数据的解决方案。

允许您指定动词(在这种AFHTTPClient情况下为 POST)以及要传递的参数。

请参阅:AFNetworking 发布请求

于 2013-04-02T05:19:32.050 回答