             return escaped
         }
         #endif
-        
+
         return url
     }
 }

    /// - Returns: a ClientRequest instance
    ///
    public static func request(_ options: [ClientRequestOptions], callback: ClientRequestCallback) -> ClientRequest {
        
        return ClientRequest(options: options, callback: callback)
        
    }
    
    ///
    /// Creates a new ClientRequest using URL
    /// *Note*: This method will end the ClientRequest immediately after creation
    ///
    /// - Parameter url: URL address for the request
    /// - Parameter callback: closure to run after the request 
    ///
    /// - Returns: a ClientRequest instance
    ///
    public static func get(_ url: String, callback: ClientRequestCallback) -> ClientRequest {
        
        let req = ClientRequest(url: url, callback: callback)
        req.end()
        return req
        
    }

    ///
    /// A set of characters that are valid in requests
    ///
    #if os(Linux)
    private static let allowedCharacterSet =  NSCharacterSet(charactersIn:"\"#%/<>?@\\^`{|}").invertedSet
    #else
    private static let allowedCharacterSet =  NSCharacterSet(charactersIn:"\"#%/<>?@\\^`{|}").inverted
    #endif
    
    ///
    /// Transform the URL into escaped characters
    /// 
    /// *Note*: URLS can only be sent over the Internet using the ASCII character set, so character escaping will
    /// transform unsafe ASCII characters with a '%' followed by two hexadecimal digits.
    ///
    public static func escapeUrl(_ url: String) -> String {
        
        #if os(Linux)
        if let escaped = url.bridge().stringByAddingPercentEncodingWithAllowedCharacters(allowedCharacterSet) {
            return escaped

        504: "Gateway Timeout", 505: "HTTP Version Not Supported", 507: "Insufficient Storage",
        511: "Network Authentication Required"
    ]

    ///
    /// Creates a new HTTP server
    ///
    /// - Returns: an instance of HTTPServer
    ///
    public static func createServer() -> HTTPServer {

        return HTTPServer()

    }

    ///
    /// Creates a new ClientRequest using URL
    ///
