     public func request(method: Alamofire.Method,
                  url: URLStringConvertible,
                  parameters: [String: AnyObject]?,
-                 success: ((JSON?) -> ())?,
-                 failure: ((NSError?) -> ())?) {
+                 success: Success,
+                 failure: Failure) {
         
         Alamofire.request(method, url, headers: headers, parameters: parameters, encoding: .JSON)
             .validate(statusCode: 200..<300)

    public func request(method: Alamofire.Method,
                        baseURL: String,
                        parameters: [String: AnyObject]?,
                        success: ((JSON?) -> ())?,
                        failure: ((NSError?) -> ())?) {
        request(method, url: fullURL(baseURL), parameters: parameters, success: success, failure: failure)
    }
}

}

public class RequestManager {
    public typealias Success = ((JSON?) -> ())?
    public typealias Failure = ((NSError?) -> ())?
    
    public static let sharedInstance = RequestManager()
    public var shouldPrintSuccedResponse = false
    public var shouldPrintFailuredResponse = true
