         if let theResponse = self.response as? NSHTTPURLResponse {
             return theResponse.statusCode
         }
-
         return nil
     }
 

        } else {
            task = session.dataTaskWithRequest(request, completionHandler: nil)
        }
        if let credentialValue = credential {
            credentials[task.taskIdentifier] = credentialValue
        }
        return task
    }


    }
}

typealias TaskID = Int
struct TaskConfiguration {
    var credential:(String, String)?
    var redirects:Bool
}

public class Requests:NSObject, NSURLSessionDelegate, NSURLSessionTaskDelegate {

    class var shared: Requests {
