Is it possible to log requests sent by NSURLSession to the console? I'm having issues with authentication and I can't debug if I can't look at the request
A possible way to print the body of a request is:
let sBody = NSString(data: request.HTTPBody!, encoding: NSASCIIStringEncoding)
print(sBody)
To print all the headers:
let sHeaderFields = request.allHTTPHeaderFields
print(sHeaderFields)