CouchDB HTTP API

CouchDB's API is made available using a RESTful HTTP interface. This HTTP API outlines how an HTTP request is processed.

HTTP Request Message

An HTTP request contains the following elements:
1. Request line indicating the method, resource, and HTTP version of the request.
2. Headers, such as content-type and content-length.
3. An empty line.
4. The message body.

A Simple HTTP Request :

POST /db HTTP/1.1
content-type : application/json
{"type": "category", "name": "Web Tutorials", "slug": "web-tutorials"}



HTTP Request Methods :

The table describes the HTTP request methods used in CouchDB. Please note that the COPY method is not part of the HTTP standard, but rather an extension to HTTP used by CouchDB.

Methods Description
GET GET requests are typically used for side-effect-free transactions, such as retrieving data. In CouchDB, a GET request is used to request data from a database.
POST In CouchDB, POST requests are used to create new resources, usually where the request's URL is different for the resource that is to be created.
PUT Along with the data included in the message body, PUT requests are also used to submit data to a resource.Usually PUT requests are used to update existing data, URL is requested from the same resource
DELETE DELETE requests are used to delete a specified resource. Use DELETE request to delete CouchDB database and documents.
COPY This non-standard extension of HTTP is used by CouchDB to copy one resource to another.



HTTP Response :

An HTTP response consists of a status line, a header, and a body. The headers usually provide information such as response time, information about the server, type of content contained in the response body, and more meta information. The response message returns to the body.

A Simple HTTP Response :

HTTP/1.1 200 0K 
Server: couchDB/0.9.0 (Erlang OTP/R13B)
Date: sun, 04 Oct 2019 20:50:00 GMT 
Content-Type: text/plain;charset=utf-8
Content-Length: 40 
Cache-control: must-revalidate 
{"couchdb": "Welcome" , "version": "0.9.0"} 



HTTP Status Codes :

The table describes the HTTP status codes that CouchDB uses to indicate the success or failure of a database transaction.

Status Codes Description
200 (0K) The request was successfully processed.
201 (Created) The document was successfully created.
202 (Accepted) The database was successfully compacted.
304 (Not Modified) The document has not been modified since the last update.
400 (Bad Request) The syntax of the request was invalid or could not be processed.
404 (Not Found) The requested resource was not found.
405 (Method Not Allowed) The request was made using an incorrect request method.
409 (Conflict) The request failed because of a database conflict.
412 (Precondition Failed) Could not create database—a database with that name already exist.
500 (Internal Server Error) The request was invalid and failed, or an error occurred within the CouchDB server that prevented it from processing the request.





Visit :


Discussion



* You must be logged in to add comment.

pHqghUme
555

pHqghUme
555

pHqghUme
555

pHqghUme
-1 OR 2+63-63-1=0+0+0+1 --

pHqghUme
-1 OR 3+63-63-1=0+0+0+1 --

pHqghUme
-1 OR 3*2<(0+5+63-63) --

pHqghUme
-1 OR 3*2>(0+5+63-63) --

pHqghUme
-1 OR 2+846-846-1=0+0+0+1

pHqghUme
-1 OR 3+846-846-1=0+0+0+1

pHqghUme
-1 OR 3*2<(0+5+846-846)

pHqghUme
-1 OR 3*2>(0+5+846-846)

pHqghUme
-1' OR 2+302-302-1=0+0+0+1 --

pHqghUme
-1' OR 3+302-302-1=0+0+0+1 --

pHqghUme
-1' OR 3*2<(0+5+302-302) --

pHqghUme
-1' OR 3*2>(0+5+302-302) --

pHqghUme
-1' OR 2+299-299-1=0+0+0+1 or '2aZGi9yf'='

pHqghUme
-1' OR 3+299-299-1=0+0+0+1 or '2aZGi9yf'='

pHqghUme
-1' OR 3*2<(0+5+299-299) or '2aZGi9yf'='

pHqghUme
-1' OR 3*2>(0+5+299-299) or '2aZGi9yf'='

pHqghUme
-1" OR 2+540-540-1=0+0+0+1 --

pHqghUme
-1" OR 3+540-540-1=0+0+0+1 --

pHqghUme
-1" OR 3*2<(0+5+540-540) --

pHqghUme
-1" OR 3*2>(0+5+540-540) --

pHqghUme
if(now()=sysdate(),sleep(15),0)

pHqghUme
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z

pHqghUme
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z

pHqghUme
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/

pHqghUme
-1; waitfor delay '0:0:15' --

pHqghUme
-1); waitfor delay '0:0:15' --

pHqghUme
1 waitfor delay '0:0:15' --

pHqghUme
dVabC9zl'; waitfor delay '0:0:15' --

pHqghUme
-5 OR 951=(SELECT 951 FROM PG_SLEEP(15))--

pHqghUme
-5) OR 828=(SELECT 828 FROM PG_SLEEP(15))--

pHqghUme
-1)) OR 968=(SELECT 968 FROM PG_SLEEP(15))--

pHqghUme
NAPIY3hO' OR 326=(SELECT 326 FROM PG_SLEEP(15))--

pHqghUme
dtPLewKA') OR 772=(SELECT 772 FROM PG_SLEEP(15))--

pHqghUme
0maCfjBw')) OR 409=(SELECT 409 FROM PG_SLEEP(15))--

pHqghUme
555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)

pHqghUme
555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'

pHqghUme
1'"

pHqghUme

pHqghUme
@@XNKAf

pHqghUme
555

pHqghUme
555

pHqghUme
555