Closed GrandLarseny closed 2 years ago
Interestingly, the data(...) async throws
function in URLSession
is only available in iOS 15 and later. Since that's the case I'm just going for wrapping the existing BackendService.execute()
call in an await withCheckedThrowingContinuation
block, similar to the futures wrapper.
It's inelegant, but efficient and a working solution. I'd like to revisit once URLSession
's async version is supported in iOS 13 (which probably will happen. Probably.)
Closing with merge of #142
With the new back support for
async/await
in versions of iOS 13 and later, it appears that many more project will want to useasync/await
with hyperspace.Let's go ahead and incorporate
async/await