         var alamoRequest = self.manager.request(request)
 
         if let willSendRequest = self.willSendRequest {
-            alamoRequest = willSendRequest(alamoRequest)
+            alamoRequest = willSendRequest(alamoRequest, target)
         }
 
         // Perform the actual request


public class AlamofireBackend: BackendType {
    let manager: Manager
    let willSendRequest: (AlamofireRequestType -> Request)?

    public init(manager: Manager = DefaultAlamofireManager(), willSendRequest: (AlamofireRequestType -> Request)? = nil) {
        self.manager = manager
        self.willSendRequest = willSendRequest
    }

import Foundation
import Alamofire

/// Internal token that can be used to cancel requests
internal final class CancellableToken: Cancellable , CustomDebugStringConvertible {
