                 case .hostname(let host):
                     hostName = host
                 case .port(let thePort):
-                    port = ":\(thePort)"
+                    let portNumber = thePort.toUInt16()
+                    port = ":\(portNumber)"
                 case .path(var thePath):
                     if thePath.first != "/" {
                       thePath = "/" + thePath


import Foundation

// MARK: ClientRequest
/**
This class provides a set of low level APIs for issuing HTTP requests to another server. A new instance of the request can be created, along with options if the user would like to specify certain parameters such as HTTP headers, HTTP methods, host names, and SSL credentials. `Data` and `String` objects cab be added to a `ClientRequest` too, and URLs can be parsed.

        }
        options.append(.path(fullPath))
        if let port = url.port {
            options.append(.port(Int16(bitPattern: UInt16(port))))
        }
        if let username = url.user {
            options.append(.username(username))
