DiscordKit: fix url encoded ? in gateway url
This commit is contained in:
@@ -10,7 +10,10 @@ actor GatewayClient {
|
||||
var sequenceNum: Int? = nil
|
||||
|
||||
init(gatewayURL: URL, token: String) {
|
||||
ws = URLSession.shared.webSocketTask(with: gatewayURL.appending(component: "?v=10&encoding=json"))
|
||||
print(gatewayURL.absoluteURL)
|
||||
print(gatewayURL.appending(queryItems: [.init(name: "v", value: "10"), .init(name: "encoding", value: "json")]))
|
||||
let queryItems = [URLQueryItem(name: "v", value: "10"), URLQueryItem(name: "encoding", value: "json")]
|
||||
ws = URLSession.shared.webSocketTask(with: gatewayURL.appending(queryItems: queryItems))
|
||||
self.token = token
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user