 
         client.urlProtocol(sender, didReceive: response, cacheStoragePolicy: .notAllowed)
 
-        if let bodyData = body
+        if let bodyData = body?.httpData
             { client.urlProtocol(sender, didLoad: bodyData) }
 
         client.urlProtocolDidFinishLoading(sender) // TODO: Should error do this as well?

        { }
    }

struct RequestPattern
    {
    var method: String
    var url: String
    var headers = [String:String]()
    var body: Data?

    func matches(_ request: URLRequest) -> Bool
        {

        return self
        }

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