Alamofire/Alamofire — pull request #85 by lesmuc (2014-09-08 17:20:53+00:00)
Title: Added support of Default Headers for Uploads

With this pull request it's able to add some custom headers to uploads. Same way like you can already add custom headers to other Alamofire Requests.

Examples for some custom headers...

1. Accept Header
Manager.sharedInstance.defaultHeaders["Accept"] = "application/json"

2. Basic Auth Header
let plainString = "username:password" as NSString
let plainData = plainString.dataUsingEncoding(NSUTF8StringEncoding)
let base64String = plainData?.base64EncodedStringWithOptions(NSDataBase64EncodingOptions.fromRaw(0)!)
Manager.sharedInstance.defaultHeaders["Authorization"] = "Basic " + base64String!