Fix missing query parameters

This commit is contained in:
Niels Andriesse 2021-04-22 16:12:13 +10:00
parent f865bd8125
commit 1561b9436f
1 changed files with 2 additions and 1 deletions

View File

@ -303,7 +303,8 @@ public enum OnionRequestAPI {
}
}
guard let url = request.url, let host = request.url?.host else { return Promise(error: Error.invalidURL) }
let endpoint = url.path.removingPrefix("/")
var endpoint = url.path.removingPrefix("/")
if let query = url.query { endpoint += "?\(query)" }
let scheme = url.scheme
let port = given(url.port) { UInt16($0) }
let parametersAsString: String