         511: "Network Authentication Required"
     ]
     
-    /// Create a new `HTTPServer`.
-    ///
-    /// - Returns: an instance of `HTTPServer`.
+    /**
+    Create a new `HTTPServer`.
+    
+    - Returns: an instance of `HTTPServer`.
+    
+    ### Usage Example: ###
+    ````swift
+    let server = HTTP.createServer()
+    ````
+    */
     public static func createServer() -> HTTPServer {
         return HTTPServer()
     }
     
-    /// Create a new `ClientRequest` using URL.
-    ///
-    /// - Parameter url: URL address for the request.
-    /// - Parameter callback: closure to run after the request.
-    /// - Returns: a `ClientRequest` instance
+    /**
+    Create a new `ClientRequest` using URL.
+    
+    - Parameter url: URL address for the request.
+    - Parameter callback: closure to run after the request.
+    - Returns: a `ClientRequest` instance
+    
+    ### Usage Example: ###
+    ````swift
+     let request = HTTP.request("http://localhost/8080") {response in
+         ...
+     }
+    ````
+    */
     public static func request(_ url: String, callback: @escaping ClientRequest.Callback) -> ClientRequest {
         return ClientRequest(url: url, callback: callback)
     }
     
-    /// Create a new `ClientRequest` using a list of options.
-    ///
-    /// - Parameter options: a list of `ClientRequest.Options`.
-    /// - Parameter callback: closure to run after the request.
-    /// - Returns: a `ClientRequest` instance
+    /**
+    Create a new `ClientRequest` using a list of options.
+    
+    - Parameter options: a list of `ClientRequest.Options`.
+    - Parameter callback: closure to run after the request.
+    - Returns: a `ClientRequest` instance
+    
+    ### Usage Example: ###
+    ````swift
+    let request = HTTP.request([ClientRequest.Options]) {response in
+        ...
+    }
+    ````
+    */
     public static func request(_ options: [ClientRequest.Options], callback: @escaping ClientRequest.Callback) -> ClientRequest {
         return ClientRequest(options: options, callback: callback)
     }
     
-    /// Create a new `ClientRequest` using URL.
-    ///
-    /// - Parameter url: URL address for the request.
-    /// - Parameter callback: closure to run after the request.
-    /// - Returns: a ClientRequest instance.
-    ///
-    /// - Note: This method will invoke the end function of the `ClientRequest`
-    ///        immediately after its creation.
+    /**
+    Get a `ClientRequest` using URL.
+    
+    - Parameter url: URL address for the request.
+    - Parameter callback: closure to run after the request.
+    - Returns: a ClientRequest instance.
+    
+    - Note: This method will invoke the end function of the `ClientRequest`
+           immediately after its creation.
+    
+    ### Usage Example: ###
+    ````swift
+     let request = HTTP.get("http://localhost/8080") { response in
+         ...
+     }
+    ````
+    */
     public static func get(_ url: String, callback: @escaping ClientRequest.Callback) -> ClientRequest {
         let req = ClientRequest(url: url, callback: callback)
         req.end()


// MARK HTTPStatusCode

/// HTTP status codes and numbers.
public enum HTTPStatusCode: Int {
    
    case accepted = 202, badGateway = 502, badRequest = 400, conflict = 409, `continue` = 100, created = 201
    case expectationFailed = 417, failedDependency  = 424, forbidden = 403, gatewayTimeout = 504, gone = 410
    case httpVersionNotSupported = 505, insufficientSpaceOnResource = 419, insufficientStorage = 507
    case internalServerError = 500, lengthRequired = 411, methodFailure = 420, methodNotAllowed = 405
    case movedPermanently = 301, movedTemporarily = 302, multiStatus = 207, multipleChoices = 300
    case networkAuthenticationRequired = 511, noContent = 204, nonAuthoritativeInformation = 203
    case notAcceptable = 406, notFound = 404, notImplemented = 501, notModified = 304, OK = 200
    case partialContent = 206, paymentRequired = 402, preconditionFailed = 412, preconditionRequired = 428
    case proxyAuthenticationRequired = 407, processing = 102, requestHeaderFieldsTooLarge = 431
    case requestTimeout = 408, requestTooLong = 413, requestURITooLong = 414, requestedRangeNotSatisfiable = 416
    case resetContent = 205, seeOther = 303, serviceUnavailable = 503, switchingProtocols = 101
    case temporaryRedirect = 307, tooManyRequests = 429, unauthorized = 401, unprocessableEntity = 422
    case unsupportedMediaType = 415, useProxy = 305, misdirectedRequest = 421, unknown = -1
    
}

extension HTTPStatusCode {

    /// The class of a `HTTPStatusCode` code
    /// - See: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml for more information
    public enum Class {
        /// Informational: the request was received, and is continuing to be processed
        case informational
        /// Success: the action was successfully received, understood, and accepted
        case successful
        /// Redirection: further action must be taken in order to complete the request
        case redirection
        /// Client Error: the request contains bad syntax or cannot be fulfilled
        case clientError
        /// Server Error: the server failed to fulfill an apparently valid request
        case serverError
        /// Invalid: the code does not map to a well known status code class
        case invalidStatus

        init(code: Int) {
            switch code {
                case 100..<200: self = .informational
                case 200..<300: self = .successful
                case 300..<400: self = .redirection
                case 400..<500: self = .clientError
                case 500..<600: self = .serverError
                default: self = .invalidStatus
            }
        }
    }

    /// The `Class` representing the class of status code for this response status
    public var `class`: Class {
        return Class(code: self.rawValue)
    }

}

    /// A set of characters that are valid in requests.
    private static let allowedCharacterSet =  NSCharacterSet(charactersIn:"\"#%/<>?@\\^`{|} ").inverted
    
    /**
    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.
    
    ### Usage Example: ###
    ````swift
    HTTP.escape(url: testString)
    ````
    */
    public static func escape(url: String) -> String {
        if let escaped = url.addingPercentEncoding(withAllowedCharacters: allowedCharacterSet) {
            return escaped
