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 e89bad0 commit b9f84b9Copy full SHA for b9f84b9
Networking/Networking/Remote/IPLocationRemote.swift
@@ -7,8 +7,8 @@ public final class IPLocationRemote: Remote {
7
/// Fetches the country code from the device ip.
8
///
9
public func getIPCountryCode(onCompletion: @escaping (Result<String, Error>) -> Void) {
10
- let path = "geo"
11
- guard let url = URL(string: "\(Settings.wordpressApiBaseURL)/\(path)") else {
+ let path = "geo/" // Needs the trailing slash otherwise the request will fail.
+ guard let url = URL(string: Settings.wordpressApiBaseURL + path) else {
12
return onCompletion(.failure(IPLocationError.malformedURL)) // Should not happen.
13
}
14
0 commit comments