Skip to content

Commit

Permalink
fix(http-client): control what is shown printed (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
portellaa authored Feb 7, 2023
1 parent 6a750c4 commit 76b1ee6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 10 deletions.
38 changes: 28 additions & 10 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"repositoryURL": "https://github.com/vapor/async-kit.git",
"state": {
"branch": null,
"revision": "3b1e7e9069a62295151c6c1609050cd38a0a7af5",
"version": "1.11.0"
"revision": "9acea4c92f51a5885c149904f0d11db4712dda80",
"version": "1.16.0"
}
},
{
Expand All @@ -33,17 +33,17 @@
"repositoryURL": "https://github.com/vapor/fluent.git",
"state": {
"branch": null,
"revision": "ea707ee318066a073c95b2b2df1aa640fcb67f9e",
"version": "4.4.0"
"revision": "2da106f46b093885f77fa03e3c719ab5bb8cfab4",
"version": "4.6.0"
}
},
{
"package": "fluent-kit",
"repositoryURL": "https://github.com/vapor/fluent-kit.git",
"state": {
"branch": null,
"revision": "2f1af22f4d495bc6f35365e537c4bb5eb60c5f17",
"version": "1.18.0"
"revision": "be7912ee4991bcc8a5390fac0424d1d08221dcc6",
"version": "1.36.1"
}
},
{
Expand Down Expand Up @@ -82,6 +82,15 @@
"version": "1.0.0"
}
},
{
"package": "swift-atomics",
"repositoryURL": "https://github.com/apple/swift-atomics.git",
"state": {
"branch": null,
"revision": "ff3d2212b6b093db7f177d0855adbc4ef9c5f036",
"version": "1.0.3"
}
},
{
"package": "swift-backtrace",
"repositoryURL": "https://github.com/swift-server/swift-backtrace.git",
Expand All @@ -91,6 +100,15 @@
"version": "1.3.1"
}
},
{
"package": "swift-collections",
"repositoryURL": "https://github.com/apple/swift-collections.git",
"state": {
"branch": null,
"revision": "937e904258d22af6e447a0b72c0bc67583ef64a2",
"version": "1.0.4"
}
},
{
"package": "swift-crypto",
"repositoryURL": "https://github.com/apple/swift-crypto.git",
Expand Down Expand Up @@ -123,8 +141,8 @@
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "124119f0bb12384cef35aa041d7c3a686108722d",
"version": "2.40.0"
"revision": "4ad2c3733845abd9ee8892a323b0fa0d80f37e34",
"version": "2.47.0"
}
},
{
Expand Down Expand Up @@ -177,8 +195,8 @@
"repositoryURL": "https://github.com/vapor/vapor.git",
"state": {
"branch": null,
"revision": "6c63226a4ab82ce53730eb1afb9ca63866fcf033",
"version": "4.61.1"
"revision": "7b76fe01a8eb02aa7f61d9ca10624f98b25a5735",
"version": "4.69.2"
}
},
{
Expand Down
8 changes: 8 additions & 0 deletions Sources/YData/Client/InternalResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,11 @@ public extension Internal.SuccessResponse {
}
}
}

public extension CustomStringConvertible where Self: InternalResponse {
var description: String {
var desc = ["HTTP/1.1 \(status.code) \(status.reasonPhrase)"]
desc += self.headers.map { "\($0.name): \($0.value)" }
return desc.joined(separator: "\n")
}
}

0 comments on commit 76b1ee6

Please sign in to comment.