             status: Int = 200)
         {
         add(RequestStub(
-            method: method.rawValue.uppercased(),
-            url: resource().url.absoluteString,
+            matcher: RequestMatcher(
+                method: method.rawValue.uppercased(),
+                url: resource().url.absoluteString),
             status: status))
         }
 

        { }
    }

class RequestStub
    {
    var method: String
    var url: String

    init(method: String, url: String, status: Int = 200)
        {
        self.method = method
        self.url = url
        self.responseCode = status
        }

    var requestHeaders = [String:String]()
    var requestBody: Data?

    var responseError: Error?
    var responseCode: Int


    func withBody(_ data: Data) -> Self
        {
        stub.matcher.body = data
        return self
        }

