ios swift URLSession请求头插入token
2019-03-08 本文已影响0人
鹅鹅鹅_
let configuration = URLSessionConfiguration.default
configuration.httpAdditionalHeaders = Dictionary<String, String>(dictionaryLiteral: ("Authorization", "Token \(SysUtils.oAuthToken())"))
let session = URLSession.init(configuration: configuration)