         }
     }
 }
-

private var dataTaskCompletionHandlerKey = 0

private extension NSURLSessionDataTask {
    // `var request: Request?` is not available in both of Swift 1.1 and 1.2
    // ("protocol can only be used as a generic constraint")
    private var request: Any? {
        get {

        }
    }

    // send request and build response object
    public class func sendRequest<T: Request>(request: T, URLSession: NSURLSession = defaultURLSession, handler: (Result<T.Response, NSError>) -> Void = {r in}) -> NSURLSessionDataTask? {
        let mainQueue = dispatch_get_main_queue()
        
        if let URLRequest = request.URLRequest {
