| a | b | |
|---|
| 0 | | - | >>> sock = socket.create_connection(("127.0.0.1", 5984))>>> sock.send('PUT /testdb/hum1 HTTP/1.1\r\nHost: 127.0.0.1:5984\r\nAccept-Encoding: identity\r\nContent-Length: 2\r\nContent-Type: application/octet-stream\r\nExpect: 100-continue\r\nUser-Agent: restkit/0.9.2\r\n\r\n') |
|---|
| 0 | + | >>> sock = socket.create_connection(("127.0.0.1", 5984)) |
|---|
| 0 | + | >>> sock.send('PUT /testdb/hum1 HTTP/1.1\r\nHost: 127.0.0.1:5984\r\nAccept-Encoding: identity\r\nContent-Length: 2\r\nContent-Type: application/octet-stream\r\nExpect: 100-continue\r\nUser-Agent: restkit/0.9.2\r\n\r\n') |
|---|
| ... | |
|---|
| 1 | 1 | | 186 |
|---|
| 2 | 2 | | >>> sock.recv(4096)'HTTP/1.1 100 Continue\r\n\r\n' |
|---|
| 3 | 3 | | >>> sock.send("{}")2 |
|---|
| 4 | 4 | | >>> sock.recv(4096)'HTTP/1.1 201 Created\r\nServer: CouchDB/0.11.0b22c551bb-git (Erlang OTP/R13B)\r\nLocation: http://127.0.0.1:5984/testdb/hum1\r\nEtag: "1-967a00dff5e02add41819138abb3284d"\r\nDate: Fri, 18 Dec 2009 20:49:48 GMT\r\nContent-Type: text/plain;charset=utf-8\r\nContent-Length: 67\r\nCache-Control: must-revalidate\r\n\r\n{"ok":true,"id":"hum1","rev":"1-967a00dff5e02add41819138abb3284d"}\n' |
|---|
| ... | |
|---|
| 5 | | - | >>> sock = socket.create_connection(("127.0.0.1", 5984))>>> sock.send('PUT /testdb/hum1/att1 HTTP/1.1\r\nHost: 127.0.0.1:5984\r\nAccept-Encoding: identity\r\nContent-Length: 2\r\nContent-Type: application/octet-stream\r\nExpect: 100-continue\r\nUser-Agent: restkit/0.9.2\r\n\r\n') |
|---|
| 5 | + | >>> sock = socket.create_connection(("127.0.0.1", 5984)) |
|---|
| 5 | + | >>> sock.send('PUT /testdb/hum1/att1 HTTP/1.1\r\nHost: 127.0.0.1:5984\r\nAccept-Encoding: identity\r\nContent-Length: 2\r\nContent-Type: application/octet-stream\r\nExpect: 100-continue\r\nUser-Agent: restkit/0.9.2\r\n\r\n') |
|---|
| ... | |
|---|
| 6 | 6 | | 191 |
|---|
| 7 | 7 | | >>> sock.recv(4096) |
|---|
| 8 | 8 | | 'HTTP/1.1 409 Conflict\r\nServer: CouchDB/0.11.0b22c551bb-git (Erlang OTP/R13B)\r\nDate: Fri, 18 Dec 2009 20:50:22 GMT\r\nContent-Type: text/plain;charset=utf-8\r\nContent-Length: 58\r\nCache-Control: must-revalidate\r\n\r\n{"error":"conflict","reason":"Document update conflict."}\n' |
|---|
| ... | |
|---|
| 9 | | - | >>> sock = socket.create_connection(("127.0.0.1", 5984))>>> sock.send('PUT /testdb/hum1/att1?rev=1-967a00dff5e02add41819138abb3284d HTTP/1.1\r\nHost: 127.0.0.1:5984\r\nAccept-Encoding: identity\r\nContent-Length: 2\r\nContent-Type: application/octet-stream\r\nExpect: 100-continue\r\nUser-Agent: restkit/0.9.2\r\n\r\n') |
|---|
| 9 | + | >>> sock = socket.create_connection(("127.0.0.1", 5984)) |
|---|
| 9 | + | >>> sock.send('PUT /testdb/hum1/att1?rev=1-967a00dff5e02add41819138abb3284d HTTP/1.1\r\nHost: 127.0.0.1:5984\r\nAccept-Encoding: identity\r\nContent-Length: 2\r\nContent-Type: application/octet-stream\r\nExpect: 100-continue\r\nUser-Agent: restkit/0.9.2\r\n\r\n') |
|---|
| ... | |
|---|
| 10 | 10 | | 230 |
|---|
| 11 | 11 | | >>> sock.recv(4096) |
|---|
| 12 | 12 | | Traceback (most recent call last): |
|---|
| ... | |
|---|