# Alamofire

**URL:** https://forums.swift.org/c/related-projects/alamofire/37.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [About the Alamofire category](https://forums.swift.org/t/about-the-alamofire-category/14378)

<div class="topic-metadata">

**Author:** [@Nicole\_Jacque](https://forums.swift.org/u/Nicole_Jacque)\
**Replies:** 3\
**Last updated:** [October 2, 2018, 4:55am UTC](https://forums.swift.org/t/about-the-alamofire-category/14378 "2018-10-02T04:55:16Z")

</div>

Alamofire is an elegant HTTP networking library written in Swift.

---

## [The network connection was lost, error code 1005, Alamofire](https://forums.swift.org/t/the-network-connection-was-lost-error-code-1005-alamofire/76329)

<div class="topic-metadata">

**Author:** [@mihaicris](https://forums.swift.org/u/mihaicris)\
**Replies:** 4\
**Last updated:** [December 3, 2024, 6:52pm UTC](https://forums.swift.org/t/the-network-connection-was-lost-error-code-1005-alamofire/76329 "2024-12-03T18:52:30Z")

</div>

I am having the following error, for which I have no explanation since the network is present and other requests work fine. What could be the issue? Any hint how to debug further? Alamofire 5.9.1. Thank you! AF Error: A…

---

## [Merging Data for POST request](https://forums.swift.org/t/merging-data-for-post-request/63357)

<div class="topic-metadata">

**Author:** [@caraberdop](https://forums.swift.org/u/caraberdop)\
**Replies:** 4\
**Last updated:** [August 16, 2024, 7:20am UTC](https://forums.swift.org/t/merging-data-for-post-request/63357 "2024-08-16T07:20:01Z")

</div>

so I have a struct that I need to send the data as the payload to a POST request. But I also need to append more data to that payload along with the struct. How do I merge the data together. struct Series: Codable, Hash…

---

## [Improving the issue of duplicate calls to the retry function in RequestRetrier Due to 401 Errors in Alamofire](https://forums.swift.org/t/improving-the-issue-of-duplicate-calls-to-the-retry-function-in-requestretrier-due-to-401-errors-in-alamofire/72257)

<div class="topic-metadata">

**Author:** [@Parkjju](https://forums.swift.org/u/Parkjju)\
**Replies:** 0\
**Last updated:** [June 5, 2024, 7:27am UTC](https://forums.swift.org/t/improving-the-issue-of-duplicate-calls-to-the-retry-function-in-requestretrier-due-to-401-errors-in-alamofire/72257 "2024-06-05T07:27:00Z")

</div>

When authentication APIs with access tokens are requested simultaneously, rather than in a chaining manner, a race condition occurs, resulting in inconsistent outcomes. Consider the scenario where both APIs need to incl…

---

## [Testing DataRequests](https://forums.swift.org/t/testing-datarequests/70807)

<div class="topic-metadata">

**Author:** [@mihaicris](https://forums.swift.org/u/mihaicris)\
**Replies:** 2\
**Last updated:** [March 22, 2024, 3:19pm UTC](https://forums.swift.org/t/testing-datarequests/70807 "2024-03-22T15:19:05Z")

</div>

How can I test DataRequest properties after creation, asserting url, method, headers, and httpData after an RequestAdapter is used (for example adding additional headers), but without making the request? let dataRequest…

---

## [5.9.0 Released!](https://forums.swift.org/t/5-9-0-released/70416)

<div class="topic-metadata">

**Author:** [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Replies:** 1\
**Last updated:** [March 4, 2024, 2:28am UTC](https://forums.swift.org/t/5-9-0-released/70416 "2024-03-04T02:28:55Z")

</div>

Released on 2024-03-03. All issues associated with this milestone can be found using this filter. Added \[:fire: Experimental :fire:\] WebSocketRequest, as a wrapper for URLSessionWebSocketTask. This preview release is u…

---

## [WebSocketRequest Development Started](https://forums.swift.org/t/websocketrequest-development-started/47154)

<div class="topic-metadata">

**Author:** [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Replies:** 4\
**Last updated:** [February 1, 2024, 2:41pm UTC](https://forums.swift.org/t/websocketrequest-development-started/47154 "2024-02-01T14:41:12Z")

</div>

Alamofire has started development of a WebSocketRequest type on the feature/websocket-request branch. WebSocketRequest wraps URLSessionWebSocketTask to provide websocket functionality using Alamofire APIs. We'd like to a…

---

## [EventMonitor similar methods](https://forums.swift.org/t/eventmonitor-similar-methods/69470)

<div class="topic-metadata">

**Author:** [@mihaicris](https://forums.swift.org/u/mihaicris)\
**Replies:** 2\
**Last updated:** [January 16, 2024, 3:48pm UTC](https://forums.swift.org/t/eventmonitor-similar-methods/69470 "2024-01-16T15:48:19Z")

</div>

Hi, Why there are 2 methods for the same task in EventMonitor? I need to implement both otherwise some requests are not handled. func request(\_ request: DataRequest, didParseResponse response: DataResponse\<Data?, A…

---

## [Alamofire 5.8.1 Released](https://forums.swift.org/t/alamofire-5-8-1-released/68088)

<div class="topic-metadata">

**Author:** [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Replies:** 0\
**Last updated:** [October 26, 2023, 8:05pm UTC](https://forums.swift.org/t/alamofire-5-8-1-released/68088 "2023-10-26T20:05:46Z")

</div>

Updated Internal: Protected to no longer be a @propertyWrapper. Updated by Jon Shier in Pull Request #3777. Fixed URLEncodedFormEncoder encoding of Encodable values with optional properties using encodeIfPresent. F…

---

## [Did Alamofireimage 4.2.0 support TLS 1.2?](https://forums.swift.org/t/did-alamofireimage-4-2-0-support-tls-1-2/65826)

<div class="topic-metadata">

**Author:** [@Muhammadi](https://forums.swift.org/u/Muhammadi)\
**Replies:** 1\
**Last updated:** [June 26, 2023, 4:07pm UTC](https://forums.swift.org/t/did-alamofireimage-4-2-0-support-tls-1-2/65826 "2023-06-26T16:07:45Z")

</div>

Hi Everyone I need to find out the official release or any official document about Did AlamofireImage 4.2.0 support TLS 1.2 ? can anyone help me to find out this one. Thanks

---

## [Implement Cache functionality in Alamofire](https://forums.swift.org/t/implement-cache-functionality-in-alamofire/64956)

<div class="topic-metadata">

**Author:** [@sspogra](https://forums.swift.org/u/sspogra)\
**Replies:** 0\
**Last updated:** [May 12, 2023, 9:47am UTC](https://forums.swift.org/t/implement-cache-functionality-in-alamofire/64956 "2023-05-12T09:47:37Z")

</div>

I want to implement cache functionally in Alamofire 5.5.0 and fetch the cache data when user is offline. Any help regarding this?

---

## [Making a POST request](https://forums.swift.org/t/making-a-post-request/63400)

<div class="topic-metadata">

**Author:** [@caraberdop](https://forums.swift.org/u/caraberdop)\
**Replies:** 3\
**Last updated:** [February 28, 2023, 12:13am UTC](https://forums.swift.org/t/making-a-post-request/63400 "2023-02-28T00:13:47Z")

</div>

Trying to make JSON a payload for a POST request I have a Model that comes from my API struct Series: Codable, Hashable, Identifiable { let id: Int let title: String let overview: String func hash(into…

---

## [Deprecating AFNetworking broke Pods caching](https://forums.swift.org/t/deprecating-afnetworking-broke-pods-caching/62958)

<div class="topic-metadata">

**Author:** [@yousefhamza](https://forums.swift.org/u/yousefhamza)\
**Replies:** 0\
**Last updated:** [February 5, 2023, 2:29pm UTC](https://forums.swift.org/t/deprecating-afnetworking-broke-pods-caching/62958 "2023-02-05T14:29:51Z")

</div>

Hi everyone :wave: This topic is meant to be as a reference for anyone debugging why their Pods caching broke and they still have AFNetworking in their Podfile. On January 17th AFNetworking was deprecated and it's alre…

---

## [How to secure request headers?](https://forums.swift.org/t/how-to-secure-request-headers/61798)

<div class="topic-metadata">

**Author:** [@xbladesub](https://forums.swift.org/u/xbladesub)\
**Replies:** 2\
**Last updated:** [December 6, 2022, 3:53pm UTC](https://forums.swift.org/t/how-to-secure-request-headers/61798 "2022-12-06T15:53:43Z")

</div>

How can I secure request headers from being exposed using Proxyman? I can easily get an access to api tokens and any credentials that my app sends to my back-end. I'd like to know is there any way to secure headers/body …

---

## [Found 70GB of Alamofire\_CFDownloads in 3 days](https://forums.swift.org/t/found-70gb-of-alamofire-cfdownloads-in-3-days/61088)

<div class="topic-metadata">

**Author:** [@jgclark](https://forums.swift.org/u/jgclark)\
**Replies:** 7\
**Last updated:** [November 3, 2022, 11:13pm UTC](https://forums.swift.org/t/found-70gb-of-alamofire-cfdownloads-in-3-days/61088 "2022-11-03T23:13:25Z")

</div>

I'm not a developer using Alamofire, but clearly some of the apps I use use it. I've been having to reboot my macOS 12.6 machine every few days as it gets critically low on disk space. I've now tracked down Alamofire as…

---

## ['DownloadFileDestination' is not a member type of class 'Alamofire.DownloadRequest'](https://forums.swift.org/t/downloadfiledestination-is-not-a-member-type-of-class-alamofire-downloadrequest/60994)

<div class="topic-metadata">

**Author:** [@hemisferaketiga](https://forums.swift.org/u/hemisferaketiga)\
**Replies:** 2\
**Last updated:** [October 24, 2022, 4:20am UTC](https://forums.swift.org/t/downloadfiledestination-is-not-a-member-type-of-class-alamofire-downloadrequest/60994 "2022-10-24T04:20:34Z")

</div>

Hi, I new to iOS dev and swift/alamofire.. Currently I need to update our app, but when try to run using emulator, got error as below "'DownloadFileDestination' is not a member type of class 'Alamofire.DownloadRequest'…

---

## [How to handle empty response in ResponseSerializer](https://forums.swift.org/t/how-to-handle-empty-response-in-responseserializer/60155)

<div class="topic-metadata">

**Author:** [@micHar](https://forums.swift.org/u/micHar)\
**Replies:** 1\
**Last updated:** [September 7, 2022, 7:18pm UTC](https://forums.swift.org/t/how-to-handle-empty-response-in-responseserializer/60155 "2022-09-07T19:18:42Z")

</div>

What does it really mean that a response in serializer is empty? How do handle such a situation properly? Right now I'm doing something like this but it's fishy. I realize that I could use a custom error type here, but I…

---

## [Understanding Alamofire (examples/documentation)](https://forums.swift.org/t/understanding-alamofire-examples-documentation/59326)

<div class="topic-metadata">

**Author:** [@chrstphfrtz](https://forums.swift.org/u/chrstphfrtz)\
**Replies:** 6\
**Last updated:** [July 30, 2022, 3:00pm UTC](https://forums.swift.org/t/understanding-alamofire-examples-documentation/59326 "2022-07-30T15:00:10Z")

</div>

Hey everyone! I have some problems getting code to run and think that it has to do with my understanding of how Alamofire and/or Swift works. I am fairly new to Swift but have been programming in other languages for yea…

---

## [Why \`DownloadRequest\`'s \`serializingDownloadedFileURL()\` doesn't have \`automaticallyCancelling\` paramerter?](https://forums.swift.org/t/why-downloadrequest-s-serializingdownloadedfileurl-doesnt-have-automaticallycancelling-paramerter/56770)

<div class="topic-metadata">

**Author:** [@StevenSorial](https://forums.swift.org/u/StevenSorial)\
**Replies:** 5\
**Last updated:** [April 18, 2022, 11:37am UTC](https://forums.swift.org/t/why-downloadrequest-s-serializingdownloadedfileurl-doesnt-have-automaticallycancelling-paramerter/56770 "2022-04-18T11:37:37Z")

</div>

Looking at the source code, it seems that Alamofire chose not to expose the underlying automaticallyCancelling for serializingDownload(using:automaticallyCancelling:). I know that I can extend DownloadRequest and make a…

---

## [Using Instruments on Alamofire](https://forums.swift.org/t/using-instruments-on-alamofire/50676)

<div class="topic-metadata">

**Author:** [@viniciuscarvalhom](https://forums.swift.org/u/viniciuscarvalhom)\
**Replies:** 6\
**Last updated:** [April 14, 2022, 12:03am UTC](https://forums.swift.org/t/using-instruments-on-alamofire/50676 "2022-04-14T00:03:49Z")

</div>

I was doing a recent research on using Instruments for analysis with the Networking phase, but due to the use of Alamofire it doesn't capture any of those measurements that are taken from the URLSession. In this WWDC vi…

---

## [Alamofire 5.6.0 Released](https://forums.swift.org/t/alamofire-5-6-0-released/56745)

<div class="topic-metadata">

**Author:** [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Replies:** 0\
**Last updated:** [April 14, 2022, 12:00am UTC](https://forums.swift.org/t/alamofire-5-6-0-released/56745 "2022-04-14T00:00:58Z")

</div>

Biggest change in this version is that Swift 5.6.0 is now required to build Alamofire's Swift Concurrency support in order to avoid bugs with Xcode 13.2.0 and 13.2.1. Xcode 13.3.1 is the first bug free release, at least …

---

## [Monitor decoding errors](https://forums.swift.org/t/monitor-decoding-errors/56202)

<div class="topic-metadata">

**Author:** [@mihaicris](https://forums.swift.org/u/mihaicris)\
**Replies:** 2\
**Last updated:** [March 24, 2022, 7:48pm UTC](https://forums.swift.org/t/monitor-decoding-errors/56202 "2022-03-24T19:48:17Z")

</div>

Hi, I would like to monitor events for Decoding errors. In the EventMonitor protocol I couldn't find and method useful. DecodableResponseSerializer class would only throw the error without using the eventMonitor mecha…

---

## [How to observe credential in AuthenticationInterceptor from Alamofire](https://forums.swift.org/t/how-to-observe-credential-in-authenticationinterceptor-from-alamofire/55069)

<div class="topic-metadata">

**Author:** [@antranapp](https://forums.swift.org/u/antranapp)\
**Replies:** 0\
**Last updated:** [February 3, 2022, 9:11am UTC](https://forums.swift.org/t/how-to-observe-credential-in-authenticationinterceptor-from-alamofire/55069 "2022-02-03T09:11:56Z")

</div>

I'm using AuthenticationInterceptor with a custom Authenticator to handle the token refresh. Since we are migrating from an old network stack to Alamofire, I need to keep track of the credential property in Authenticati…

---

## [Unable to get Alamofire working](https://forums.swift.org/t/unable-to-get-alamofire-working/54904)

<div class="topic-metadata">

**Author:** [@stuxamber](https://forums.swift.org/u/stuxamber)\
**Replies:** 2\
**Last updated:** [January 28, 2022, 3:38am UTC](https://forums.swift.org/t/unable-to-get-alamofire-working/54904 "2022-01-28T03:38:04Z")

</div>

Hello, I am trying to get a basic sample of Alamofire working, but I am unable to do so. This is for a MacOS command-line app project I have added the dependency, and code completion works. But as soon as I run the sa…

---

## [Accurately determining Alamofire Swift version compatibility for the Swift Package Index](https://forums.swift.org/t/accurately-determining-alamofire-swift-version-compatibility-for-the-swift-package-index/54715)

<div class="topic-metadata">

**Author:** [@daveverwer](https://forums.swift.org/u/daveverwer)\
**Replies:** 4\
**Last updated:** [January 20, 2022, 3:59pm UTC](https://forums.swift.org/t/accurately-determining-alamofire-swift-version-compatibility-for-the-swift-package-index/54715 "2022-01-20T15:59:20Z")

</div>

Hello! We’ve been doing a bit of investigation into a discrepancy between the Swift version compatibility results for Alamofire on the Swift Package Index and what the intended compatibility is. You state in your badge…

---

## [Any way to use custom ImageResponseSerializer?](https://forums.swift.org/t/any-way-to-use-custom-imageresponseserializer/54222)

<div class="topic-metadata">

**Author:** [@Banannzza](https://forums.swift.org/u/Banannzza)\
**Replies:** 1\
**Last updated:** [December 22, 2021, 11:42am UTC](https://forums.swift.org/t/any-way-to-use-custom-imageresponseserializer/54222 "2021-12-22T11:42:46Z")

</div>

Hello, I wanted to use a custom serializer, but unfortunately af.setImage public func setImage(withURL url: URL, cacheKey: String? = nil, placeholderImage: UIImage? = …

---

## [Alamofire 5.5.0 Released!](https://forums.swift.org/t/alamofire-5-5-0-released/54037)

<div class="topic-metadata">

**Author:** [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Replies:** 1\
**Last updated:** [December 14, 2021, 12:55am UTC](https://forums.swift.org/t/alamofire-5-5-0-released/54037 "2021-12-14T00:55:24Z")

</div>

Alamofire 5.5 is the first release where we're labeling features we consider experimental. These features, while fully designed and well tested, rely on language or framework features which may change or require breaking…

---

## [Alamofire + Swift Concurrency](https://forums.swift.org/t/alamofire-swift-concurrency/49565)

<div class="topic-metadata">

**Author:** [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Replies:** 1\
**Last updated:** [December 12, 2021, 2:39am UTC](https://forums.swift.org/t/alamofire-swift-concurrency/49565 "2021-12-12T02:39:35Z")

</div>

Support for the Swift Concurrency features has been implemented for DataRequests and is tracked in this draft PR. You can now await requests in Alamofire through the production of DataTask values, which encapsulate an un…

---

## [Usage of emptyResponseCodes or perhaps a custom response serializer?](https://forums.swift.org/t/usage-of-emptyresponsecodes-or-perhaps-a-custom-response-serializer/53763)

<div class="topic-metadata">

**Author:** [@mattd](https://forums.swift.org/u/mattd)\
**Replies:** 3\
**Last updated:** [November 29, 2021, 7:23pm UTC](https://forums.swift.org/t/usage-of-emptyresponsecodes-or-perhaps-a-custom-response-serializer/53763 "2021-11-29T19:23:34Z")

</div>

I'm dealing a JSON service that returns 200 as the response code and "null" as the response body to indicate when the requested item couldn't be found. I've read up on the usage of emptyResponseCodes: \[200, ...\], but it…

---

## [Any plans for adopting DocC?](https://forums.swift.org/t/any-plans-for-adopting-docc/53234)

<div class="topic-metadata">

**Author:** [@TiagoLopes](https://forums.swift.org/u/TiagoLopes)\
**Replies:** 8\
**Last updated:** [November 3, 2021, 7:46pm UTC](https://forums.swift.org/t/any-plans-for-adopting-docc/53234 "2021-11-03T19:46:40Z")

</div>

Is this something Alamofire would be interested in having?

[Next page](https://forums.swift.org/c/related-projects/alamofire/37.md?page=1)
