Instance Property

textEncodingName

The name of the text encoding provided by the response’s originating source.

Declaration

var textEncodingName: String? { get }

Discussion

If no text encoding was provided by the protocol, this property’s value is nil.

You can convert this string to a CFStringEncoding value by calling CFStringConvertIANACharSetNameToEncoding(_:). You can subsequently convert that value to an NSStringEncoding value by calling CFStringConvertEncodingToNSStringEncoding(_:).

See Also

Getting the Response Properties

var expectedContentLength: Int64

The expected length of the response’s content.

var suggestedFilename: String?

A suggested filename for the response data.

var mimeType: String?

The MIME type of the response.

var url: URL?

The URL for the response.