 
     private func uriForRecord(guid: String) -> NSURL {
         return self.collectionURI.URLByAppendingPathComponent(guid)
+    }
+
+    public func put(record: Record<T>, ifUnmodifiedSince: Timestamp?) -> Deferred<Result<StorageResponse<Timestamp>>> {
+        if let body = self.encrypter.serializer(record) {
+            log.debug("Body is \(body)")
+            log.debug("Original record is \(record)")
+            return self.client.putResource(uriForRecord(record.id), body: body, ifUnmodifiedSince: ifUnmodifiedSince, f: decimalSecondsStringToTimestamp)
+        }
+        return deferResult(RecordParseError())
     }
 
     public func get(guid: String) -> Deferred<Result<StorageResponse<Record<T>>>> {

    func requestDELETE(url: NSURL) -> Request {
        let req = NSMutableURLRequest(URL: url)
        req.HTTPMethod = Method.DELETE.rawValue
        req.addValue("1", forHTTPHeaderField: "X-Confirm-Delete")
        let authorized: NSMutableURLRequest = self.authorizer(req)
        return Alamofire.request(authorized)
    }

    private func doOp<T>(op: (NSURL) -> Request, path: String, f: (JSON) -> T?) -> Deferred<Result<StorageResponse<T>>> {
        let deferred = Deferred<Result<StorageResponse<T>>>(defaultQueue: self.resultQueue)
        let req = op(self.serverURI.URLByAppendingPathComponent(path))
        req.responseParsedJSON(errorWrap(deferred, { (_, response, data, error) in
            if let json: JSON = data as? JSON {
                if let v = f(json) {
                    let storageResponse = StorageResponse<T>(value: v, response: response!)

            }

            deferred.fill(Result(failure: RecordParseError()))
        })

        req.responseParsedJSON(handler)
        return deferred
    }

    // Sync storage responds with a plain timestamp to a PUT, not with a JSON body.
    private func putResource<T>(path: String, body: JSON, ifUnmodifiedSince: Timestamp?, f: (String) -> T?) -> Deferred<Result<StorageResponse<T>>> {
        let url = self.serverURI.URLByAppendingPathComponent(path)
        return self.putResource(url, body: body, ifUnmodifiedSince: ifUnmodifiedSince, f: f)
    }

    private func putResource<T>(URL: NSURL, body: JSON, ifUnmodifiedSince: Timestamp?, f: (String) -> T?) -> Deferred<Result<StorageResponse<T>>> {

        let deferred = Deferred<Result<StorageResponse<T>>>(defaultQueue: self.resultQueue)
        let req = self.requestPUT(URL, body: body, ifUnmodifiedSince: ifUnmodifiedSince)
        let handler = errorWrap(deferred, { (_, response, data, error) in
            if let data = data as? String {
                if let v = f(data) {
                    let storageResponse = StorageResponse<T>(value: v, response: response!)
                    deferred.fill(Result(success: storageResponse))
                } else {
                    deferred.fill(Result(failure: RecordParseError()))
                }
                return
            }

            deferred.fill(Result(failure: RecordParseError()))
        })

        // Yay Swift.
        let stringHandler = { (a, b, c: String?, d) in
            return handler(a, b, c, d)
        }

        req.responseString(encoding: nil, completionHandler: stringHandler)
        return deferred
    }

    private func getResource<T>(path: String, f: (JSON) -> T?) -> Deferred<Result<StorageResponse<T>>> {
