Skip to content

Commit de95a96

Browse files
authored
[V5] Use utilities from StreamCore (#3850)
1 parent e3e273f commit de95a96

File tree

22 files changed

+115
-994
lines changed

22 files changed

+115
-994
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let package = Package(
2929
],
3030
dependencies: [
3131
.package(url: "https://github.com/apple/swift-docc-plugin", exact: "1.0.0"),
32-
.package(url: "https://github.com/GetStream/stream-core-swift.git", exact: "0.4.0")
32+
.package(url: "https://github.com/GetStream/stream-core-swift.git", exact: "0.4.1")
3333
],
3434
targets: [
3535
.target(

Sources/StreamChat/APIClient/APIClient.swift

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -367,36 +367,3 @@ class APIClient: @unchecked Sendable {
367367
operationQueue.isSuspended = false
368368
}
369369
}
370-
371-
extension URLRequest {
372-
var queryItems: [URLQueryItem] {
373-
if let url = url,
374-
let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false),
375-
let queryItems = urlComponents.queryItems {
376-
return queryItems
377-
}
378-
return []
379-
}
380-
}
381-
382-
extension Array where Element == URLQueryItem {
383-
var prettyPrinted: String {
384-
var message = ""
385-
386-
forEach { item in
387-
if let value = item.value,
388-
value.hasPrefix("{"),
389-
let data = value.data(using: .utf8) {
390-
message += "- \(item.name)=\(data.debugPrettyPrintedJSON)\n"
391-
} else if item.name != "api_key" && item.name != "user_id" && item.name != "client_id" {
392-
message += "- \(item.description)\n"
393-
}
394-
}
395-
396-
if message.isEmpty {
397-
message = "<Empty>"
398-
}
399-
400-
return message
401-
}
402-
}

Sources/StreamChat/APIClient/Endpoints/Payloads/RawJSON.swift

Lines changed: 0 additions & 339 deletions
This file was deleted.

0 commit comments

Comments
 (0)