         return nil
     }
     
-    init(status: Int = 0, data: NSData? = nil, request: Request, error: NSError? = nil) {
+    init(status: Int = 0, headers: [String: String] = [:], data: NSData? = nil, request: Request, error: NSError? = nil) {
         self.status = status
+        self.headers = headers
         self.data = data
         self.request = request
         self.error = error

        willPerformHTTPRedirection response: NSHTTPURLResponse,
        newRequest request: NSURLRequest,
        completionHandler: (NSURLRequest?) -> Void) {
        
            completionHandler(Ladybug.followRedirects ? request : nil)
    }
    

}

class Client {
    var config = NSURLSessionConfiguration.defaultSessionConfiguration()
    let delegate = LadybugDelegate()
    
    static let sharedInstance = Client()
    private init() {}
    
    func send(request: Request) {
        let session = NSURLSession(configuration: config, delegate: delegate, delegateQueue: nil)
        
        request.willSend?(request)
        Ladybug.willSend?(request)
        
        var urlString = request.url
        if (request.method == .GET || request.method == .DELETE || request.method == .PATCH) && request.parameters?.count > 0 {
            var q = Ladybug.queryString(request.parameters)
            if urlString.containsString("?") {
                q = "&" + q.substringFromIndex(q.startIndex.advancedBy(1))
            }
            urlString += q
        }
        
        let url = NSURL(string: urlString)!
