Top "Nshttpurlresponse" questions

How to convert NSHTTPURLResponse to String in Swift

I would like to convert my response from the NSHTTPURLResponse type to String: let task = session.dataTaskWithRequest(request, completionHandler: {(data, …

string swift xcode6 nshttpurlresponse
How to get the response data out of the NSHTTPURLResponse in the callback of AFJSONRequestOperation?

I have a situation where I need to access the raw response data for an AFJSONRequestOperation, from within the callback …

ios afnetworking afjsonrequestoperation nshttpurlresponse
Get cookies from NSHTTPURLResponse

I've an extremely weird problem, I'm requesting a URL and I want to get the cookies from it, I've used …

objective-c cookies nsurlrequest nshttpurlresponse
How can I access the "Content-Type" header of an NSHTTPURLResponse?

Here's my naive first pass code: var httpUrlResponse: NSHTTPURLResponse? // = (...get from server...) let contentType = httpUrlResponse?.allHeaderFields["Content-Type"] I've tried various …

ios swift content-type nshttpurlresponse
HTTPURLResponse allHeaderFields Swift 3 Capitalisation

Converting to Swift 3 I noticed a strange bug occur reading a header field from HTTPURLResponse. let id = httpResponse.allHeaderFields["eTag"] …

ios http swift3 case-insensitive nshttpurlresponse