We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c33f0d commit 4fe4bc2Copy full SHA for 4fe4bc2
Sources/CMAB/CmabClient.swift
@@ -101,12 +101,11 @@ class DefaultCmabClient: CmabClient {
101
}
102
103
func getUrl(ruleId: String) -> URL? {
104
- let urlString = predictionEndpoint.hasSuffix("/") ? "predictionEndpoint\(ruleId)" : "\(predictionEndpoint)/\(ruleId)"
105
- guard let url = URL(string: urlString) else {
+ guard let baseURL = URL(string: predictionEndpoint) else {
106
self.logger.e("Invalid CMAB endpoint")
107
return nil
108
109
- return url
+ return baseURL.appendingPathComponent(ruleId)
110
111
112
private func doFetchWithRetry(
0 commit comments