PUT /{db}/{design-doc-id}/{attachment}

In this document

Request


Response


Example


The following example adds an attachment named sample_attachment to the design document with the identifier _design/beer3.

Request

PUT /beer-db/_design/beer3/sample_attachment?rev=1-6c1e0877a05291c2dcb58c310df99a31 HTTP/1.1
Host: localhost:59840
This is an example of an attachment

Response

HTTP/1.1 201 Created
Accept-Ranges: bytes
Content-Type: application/json
Date: Wed, 23 Apr 2014 21:41:11 GMT
Etag: "2-ebafcd22590dcfdcfed5359286dd6a1b"
Location: http://10.17.32.126:59840/beer-db/_design/beer3/sample_attachment
Server: CouchbaseLite 1.495
Transfer-Encoding: chunked
{
   "id": "_design/beer3",
   "rev": "2-ebafcd22590dcfdcfed5359286dd6a1b",
   "ok": true
}