2010-08-03 04:05:54 +00:00
|
|
|
The /camli/<blobref> endpoint returns a blob the server knows about.
|
|
|
|
|
2011-03-03 05:39:58 +00:00
|
|
|
A request with the GET verb will return 200 and the blob contents if
|
|
|
|
present, 404 if not. A request with the HEAD verb will return 200 and
|
|
|
|
the blob meta data (i.e., content-length), or 404 if the blob is not
|
|
|
|
present.
|
|
|
|
|
|
|
|
The response must include an explicit Content-Length, even with HTTP/1.1.
|
|
|
|
(The one piece of metadata a blobserver keeps on a blob is its length,
|
|
|
|
which is used in both enumerate-blobs bodies and responses to blob GETs.)
|
2010-08-03 04:05:54 +00:00
|
|
|
|
|
|
|
Get the blob:
|
|
|
|
|
|
|
|
GET /camli/sha1-126249fd8c18cbb5312a5705746a2af87fba9538 HTTP/1.1
|
|
|
|
Host: example.com
|
|
|
|
|
|
|
|
Response:
|
|
|
|
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Content-Type: application/octet-stream
|
|
|
|
Content-Length: <the blob length in bytes>
|
|
|
|
|
|
|
|
<the blob contents>
|
|
|
|
|
|
|
|
|
|
|
|
Existence check:
|
|
|
|
|
|
|
|
HEAD /camli/sha1-126249fd8c18cbb5312a5705746a2af87fba9538 HTTP/1.1
|
|
|
|
Host: example.com
|
|
|
|
|
|
|
|
Response:
|
|
|
|
|
|
|
|
HTTP/1.1 200 OK
|
|
|
|
Content-Type: application/octet-stream
|
|
|
|
Content-Length: <the blob length in bytes>
|
|
|
|
|
|
|
|
|
|
|
|
Does not exist:
|
|
|
|
|
|
|
|
GET /camli/sha1-126249fd8c18cbb5312a5705746a2af87fba9538 HTTP/1.1
|
|
|
|
Host: example.com
|
|
|
|
|
|
|
|
Response:
|
|
|
|
|
|
|
|
HTTP/1.1 404 OK
|
|
|
|
|