Parcourir la source

[PR #1927] Fixed bug in README example code around default headers.

The example code in the "Modifying the Session Configuration" section was calling the `defaultHTTPHeaders` property as an instance property rather than static.
Artur Antonov il y a 9 ans
Parent
commit
fa3c6d09b6
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -913,7 +913,7 @@ let sessionManager = Alamofire.SessionManager(configuration: configuration)
 #### Modifying the Session Configuration
 
 ```swift
-var defaultHeaders = Alamofire.SessionManager.default.defaultHTTPHeaders
+var defaultHeaders = Alamofire.SessionManager.defaultHTTPHeaders
 defaultHeaders["DNT"] = "1 (Do Not Track Enabled)"
 
 let configuration = URLSessionConfiguration.default