     let URLRequest: NSMutableURLRequest
 
     do {
+      let request = beforeEach?(request) ?? request
       URLRequest = try request.toURLRequest(baseURLString, additionalHeaders: requestHeaders)
     } catch {
       promise.reject(error)


  func register(mock mock: Mock) {
    mocks[mock.request.key] = mock
  }

  // MARK: - Helpers

  }

  public var additionalHeaders = [String: String]()
  public var beforeEach: (Requestable -> Requestable)?
  public var preProcessRequest: (NSMutableURLRequest -> Void)?

  var baseURLString: URLStringConvertible?
