如何通过" location" (NSURLRequest或URLSession的HTTP标头中的所有小写字母)?我编码像
let session = URLSession.shared
let request = NSMutableURLRequest(url: url!)
request.httpMethod = "GET"
request.addValue("XYZLocation", forHTTPHeaderField: "location")
request.addValue("XYZLoc", forHTTPHeaderField: "loc")
print("Header : \(String(describing: request.allHTTPHeaderFields))")
始终打印Location: XYZLocation, loc: XYZLoc
。我希望location:XYZLocation, loc: XYZLoc
。为什么' l'总是在地点获得资本化?