用于离线HTTP POST请求的iOS存储转发框架 [英] iOS store-and-forward framework for offline HTTP POST requests

查看:105
本文介绍了用于离线HTTP POST请求的iOS存储转发框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在一种方法(大概是库?)在用户脱机时存储HTTP POST请求,然后在用户重新联机时传输POST请求?

Is there a way (presumably a library?) to store HTTP POST requests when the user is offline, and then transmit the POST requests when the user is back online?

(我不需要读取服务器的响应,除非在POST请求失败的情况下我想重新排队请求.)

(I don't need to read the server's response, except insofar as I'll want to re-queue the requests if the POST request fails.)

推荐答案

在iOS 7中,

In iOS 7, NSURLSession can do it. It can even run the request in the background when the app has stopped running.

这篇关于用于离线HTTP POST请求的iOS存储转发框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆