Using a Router to Organize your Alamofire API Calls – Grok Swift

Previously we set up some REST API Calls With Alamofire & SwiftyJSON. While it’s a bit of overkill for those simple calls we can improve our code by using an Alamofire router. The router will put together the URL requests for us which will avoid having URL strings throughout our code. A router can also be used to apply headers, e.g., for including an OAuth token or other authorization header.

Source: Using a Router to Organize your Alamofire API Calls – Grok Swift