all repos — litestore @ caa4649c94c27f6423822d2d0d615671969a7616

A minimalist nosql document store.

admin/md/api_dir.md

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
### dir (LiteStore Directory)

This resource can be queried to retrieve files within the served directory (specied via **-d**).

#### OPTIONS dir

Returns the allowed HTTP verbs for this resource.

##### Example

```
$ curl -i -X OPTIONS http://127.0.0.1:9500/dir
HTTP/1.1 200 OK
Content-Length: 0
Access-Control-Allow-Methods: GET,OPTIONS
Allow: GET,OPTIONS
Access-Control-Allow-Headers: Content-Type
Access-Control-Allow-Origin: *
Server: LiteStore/1.0.0
```

#### GET dir/:id

Returns the content of a file within the served directory (if it exists).

##### Example

```
$ curl -i http://127.0.0.1:9500/dir/test.txt
HTTP/1.1 200 OK
Content-Length: 25
Content-Type: text/plain
Access-Control-Allow-Headers: Content-Type
Access-Control-Allow-Origin: *
Server: LiteStore/1.0.3

This is a test text file.
```