HTTPResponseStatus should print code and reason (#2257)

* HTTPResponseStatus should print code and reason

* Update HTTPResponseStatusTests+XCTest.swift

Co-authored-by: Carolina Cassedy <ccassedy@apple.com>
Co-authored-by: Cory Benfield <lukasa@apple.com>
This commit is contained in:
authored and GitHub committed 2022-08-31 05:37:08 -07:00
1 parent 2c453d6e49
commit 028cf7e606
3 files changed
+14 -1

No files matched your search

+6
View File
@@ -1311,6 +1311,12 @@ extension HTTPRequestHead: CustomStringConvertible {
}
}
extension HTTPResponseStatus: CustomStringConvertible {
public var description: String {
return "\(self.code) \(self.reasonPhrase)"
}
}
extension HTTPResponseHead: CustomStringConvertible {
public var description: String {
return "HTTPResponseHead { version: \(self.version), status: \(self.status), headers: \(self.headers) }"