How does one create a shared API Manager using Alamofire with a base url, default headers, etc?
Asked
Active
Viewed 435 times
2
-
Completely different questions – Piotr Tomasik Oct 17 '16 at 05:43
-
D'oh! Misread the title. Sorry about that. It looked like the exact same title posted by the same person minutes apart. That's a pattern I see often when someone wants to get more attention for their post. I'll remove my suggested close vote. Sorry for the confusion. – user1118321 Oct 17 '16 at 05:47
-
I think you're missing some of the Alamofire features and best practices. Alamofire is (by design) really coupled to the Swift coding practices. This includes avoiding a subclass, instead you have the Swift enum statement which works fine. Take a look on this previous answer: http://stackoverflow.com/questions/28333241/proper-usage-of-the-alamofires-urlrequestconvertible – Orlando Oct 17 '16 at 07:16
-
Maybe this is what you need http://eliasbagley.github.io/json/api/alamofire/2015/09/25/making-network-requests-with-alamofire.html – Fawkes Nov 30 '16 at 15:14