diff --git a/ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin/internal/DarwinUrlUtils.kt b/ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin/internal/DarwinUrlUtils.kt index 628de8d0229..8c85004d5f1 100644 --- a/ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin/internal/DarwinUrlUtils.kt +++ b/ktor-client/ktor-client-darwin/darwin/src/io/ktor/client/engine/darwin/internal/DarwinUrlUtils.kt @@ -37,7 +37,7 @@ internal fun Url.toNSUrl(): NSURL { else -> host.sanitize(NSCharacterSet.URLHostAllowedCharacterSet) } if (port != DEFAULT_PORT && port != protocol.defaultPort) { - components.port = NSNumber(port) + components.port = NSNumber(int = port) } components.percentEncodedPath = when {