HTTPResponseMetadata
public struct HTTPResponseMetadata
The MetadataType
for DataTransaction
s that communicate via HTTP and HTTPS.
-
The original
URL
before rewriting.Declaration
Swift
public let originalURL: URL
-
The
URL
used to issue the request, after URL rewriting.Declaration
Swift
public let issuedURL: URL
-
The final
URL
used to serve the request, after any server-side redirects.Declaration
Swift
public let finalURL: URL
-
The status code of the HTTP response.
Declaration
Swift
public let responseStatusCode: Int
-
The MIME type of the HTTP response body, if any.
Declaration
Swift
public let mimeType: String?
-
The text encoding of the HTTP response body, if any.
Declaration
Swift
public let textEncoding: String?
-
The HTTP response header fields.
Declaration
Swift
public let httpHeaders: [String: String]
-
Initializes an
HTTPResponseMetadata
instance.Declaration
Swift
public init(originalURL: URL, issuedURL: URL, finalURL: URL, responseStatusCode: Int, mimeType: String?, textEncoding: String?, httpHeaders: [String: String])
Parameters
originalURL
The original
URL
before any URL rewriting.issuedURL
The
URL
used to issue the request, after URL any rewriting.finalURL
The final
URL
used to serve the request, after any server-side redirects.responseStatusCode
The status code of the HTTP response.
mimeType
The MIME type of the HTTP response body, if any.
textEncoding
The text encoding of the HTTP response body, if any.
httpHeaders
The HTTP response header fields.
-
The
HTTPResponseStatus
of the receiver.Declaration
Swift
public var responseStatus: HTTPResponseStatus