You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, most of HTTPClient's API surface only supports Structured Concurrency violating functions. Baby steps to rectify this have been done in #806. But the elephant in the room is of course the unstructured HTTP request API.
We need to also provide a
try await httpClient.execute(request) { status, responseBodyStream in
...
}
API that fulfils Structured Concurrency by supporting cancellation and tearing everything down when the body function returns or throws without ineffective and ugly hacks like deinit (which still violates Structured Concurrency because it doesn't follow the structure of the code).