HTTPResponseMetadata
public struct HTTPResponseMetadata
The MetadataType for DataTransactions that communicate via HTTP and HTTPS.
-
The original
URLbefore rewriting.Declaration
Swift
public let originalURL: URL -
The
URLused to issue the request, after URL rewriting.Declaration
Swift
public let issuedURL: URL -
The final
URLused 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
HTTPResponseMetadatainstance.Declaration
Swift
public init(originalURL: URL, issuedURL: URL, finalURL: URL, responseStatusCode: Int, mimeType: String?, textEncoding: String?, httpHeaders: [String: String])Parameters
originalURLThe original
URLbefore any URL rewriting.issuedURLThe
URLused to issue the request, after URL any rewriting.finalURLThe final
URLused to serve the request, after any server-side redirects.responseStatusCodeThe status code of the HTTP response.
mimeTypeThe MIME type of the HTTP response body, if any.
textEncodingThe text encoding of the HTTP response body, if any.
httpHeadersThe HTTP response header fields.
-
The
HTTPResponseStatusof the receiver.Declaration
Swift
public var responseStatus: HTTPResponseStatus
View on GitHub
HTTPResponseMetadata Struct Reference