         { }
     }
 
+protocol HTTPBodyConvertible
+    {
+    var httpData: Data { get }
+    }
+
+extension Data: HTTPBodyConvertible
+    {
+    var httpData: Data
+        { self }
+    }
+
+extension String: HTTPBodyConvertible
+    {
+    var httpData: Data
+        { data(using: .utf8)! }
+    }
+
 struct RequestPattern
     {
     var method: String
     var url: String
     var headers = [String:String]()
-    var body: Data?
+    var body: HTTPBodyConvertible?
 
     func matches(_ request: URLRequest) -> Bool
         {


        client.urlProtocol(sender, didReceive: response, cacheStoragePolicy: .notAllowed)

        if let bodyData = body
            { client.urlProtocol(sender, didLoad: bodyData) }

        client.urlProtocolDidFinishLoading(sender) // TODO: Should error do this as well?

        return self
        }

    func withBody(_ data: HTTPBodyConvertible?) -> Self
        {
        var response = stub.response as! HTTPResponse
        response.body = data
