4 ms·
On one of my projects I did something like this. I needed to create a resource atomically even though it was composed of many files. To accomplish this I establ
by DougWebb 17y ago
On one of my projects I did something like this. I needed to create a resource atomically even though it was composed of many files. To accomplish this I established a container resource that the client could PUT to with a tar.gz file, and the service would unpack the files into the container.
The body of a PUT request is intended to specify a new representation for the resource, but there's nothing in the standards that say that the format of the PUT body has to match the final resource. Gzipping, compressing, and chunking the representation as it travels back and forth are explicitly supported, so why not PUT a representation that represents the differences between the old and new version of the resource?