# Alamofire + Swift Concurrency

**URL:** <https://forums.swift.org/t/alamofire-swift-concurrency/49565>\
**Category:** Alamofire\
**Created:** [June 13, 2021, 1:35am UTC](https://forums.swift.org/t/alamofire-swift-concurrency/49565 "2021-06-13T01:35:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Shier](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon_shier/32/921_2.png) [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Post date:** [June 13, 2021, 1:35am UTC](https://forums.swift.org/t/alamofire-swift-concurrency/49565/1 "2021-06-13T01:35:56Z")

</div>

Support for the Swift Concurrency features has been implemented for `DataRequest`s and is tracked in [this draft PR](https://github.com/Alamofire/Alamofire/pull/3463). You can now `await` requests in Alamofire through the production of `DataTask` values, which encapsulate an underlying `Task.Handle` and `DataRequest`.

```swift
let dataTask = AF.request(url).decode(SomeType.self)
let response = await dataTask.response
let result = await dataTask.result
let value = try await dataTask.value

```

Support for other request types should follow over the coming weeks and months. If anyone has suggestions for naming for functionality, feel free to post it in this thread.

---

<div class="post-metadata">

**Author:** ![Jon\_Shier](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon_shier/32/921_2.png) [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Post date:** [December 12, 2021, 2:39am UTC](https://forums.swift.org/t/alamofire-swift-concurrency/49565/2 "2021-12-12T02:39:35Z")

</div>

This linked PR has now largely been finalized in preparation for the release of Xcode 13.2 soon. Please feel free to review the APIs, paying special attention to any features you'd like to see, the naming, and the use of specific queues for completion events in the concurrency features. APIs have been standardized around the `serializing` or `streaming` terminology.

```swift
let dataTask = AF.request(...).serializingDecodable(SomeType.self)
let response = await dataTask.response
let result = await dataTask.result
let value = try await dataTask.value

```

I'm not a huge fan of the various `*Task` types for the wrapper which produce the `async` interface, but I couldn't think of anything that would be part of the common concurrency terminology while not just being redundant like `AsyncResponse`.
