Skip to content

Releases: apploft/APLNetworkLayer

New HTTPTaskDelegate Method for Internet Connectivity

19 Jun 09:07
c674bf3
Compare
Choose a tag to compare

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.