wohali commented on issue #620: POST and ETag header
URL: https://github.com/apache/couchdb/issues/620#issuecomment-311162481
 
 
   Confirmed:
   
   ```bash
    $ curl --verbose -X POST -H "Content-Type: application/json" 
http://127.0.0.1:15984/foo -d '{"am":"joan"}'
   * Hostname was NOT found in DNS cache
   *   Trying 127.0.0.1...
   * Connected to 127.0.0.1 (127.0.0.1) port 15984 (#0)
   > POST /foo HTTP/1.1
   > User-Agent: curl/7.38.0
   > Host: 127.0.0.1:15984
   > Accept: */*
   > Content-Type: application/json
   > Content-Length: 13
   >
   * upload completely sent off: 13 out of 13 bytes
   < HTTP/1.1 201 Created
   < Cache-Control: must-revalidate
   < Content-Length: 95
   < Content-Type: application/json
   < Date: Mon, 26 Jun 2017 19:45:42 GMT
   < Location: http://127.0.0.1:15984/foo/263cad76416a130feb97e26cb400084a
   * Server CouchDB/2.1.0-3559b7f (Erlang OTP/17) is not blacklisted
   < Server: CouchDB/2.1.0-3559b7f (Erlang OTP/17)
   < X-Couch-Request-ID: acdbe8171b
   < X-CouchDB-Body-Time: 0
   <
   
{"ok":true,"id":"263cad76416a130feb97e26cb400084a","rev":"1-c29e0faaccb770dc8964a43d22825195"}
   * Connection #0 to host 127.0.0.1 left intact
   $ curl --verbose -X PUT -H "Content-Type: application/json" 
http://127.0.0.1:15984/foo/bar -d '{"bread":"makes you fat"}'
   * Hostname was NOT found in DNS cache
   *   Trying 127.0.0.1...
   * Connected to 127.0.0.1 (127.0.0.1) port 15984 (#0)
   > PUT /foo/bar HTTP/1.1
   > User-Agent: curl/7.38.0
   > Host: 127.0.0.1:15984
   > Accept: */*
   > Content-Type: application/json
   > Content-Length: 25
   >
   * upload completely sent off: 25 out of 25 bytes
   < HTTP/1.1 201 Created
   < Cache-Control: must-revalidate
   < Content-Length: 66
   < Content-Type: application/json
   < Date: Mon, 26 Jun 2017 19:46:36 GMT
   < ETag: "1-4cd6186966b5c93e45a3f878d6029f67"
   < Location: http://127.0.0.1:15984/foo/bar
   * Server CouchDB/2.1.0-3559b7f (Erlang OTP/17) is not blacklisted
   < Server: CouchDB/2.1.0-3559b7f (Erlang OTP/17)
   < X-Couch-Request-ID: cdbe78e97c
   < X-CouchDB-Body-Time: 0
   <
   {"ok":true,"id":"bar","rev":"1-4cd6186966b5c93e45a3f878d6029f67"}
   * Connection #0 to host 127.0.0.1 left intact
   ```
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to