Skip to content

New HTTPTaskDelegate Method for Internet Connectivity

Latest
Compare
Choose a tag to compare
@nischu nischu released this 19 Jun 09:07
· 9 commits to master since this release
c674bf3

As you never really know whether you are offline or not unless you try to actually send a network request, provide a new HTTPTaskDelegate method indicating that a httpTask is currently waiting for network connectivity.

This can be used to visually hint the user that the application is currently unable to load data but still trying to.

The situation is resolved (in other words, you are connected again) if the task's didReceiveResponse method is called (which means the HTTP headers were received).

A further improvement would be to map this to an (observable?) property on the HTTPTask (like isWaitingForConnectivity), but this is out of scope for this release.