A fast HTTP interface for Redis
/COMMAND/arg0/arg1/.../argN[.ext]
on Webdis executes the command on Redis and returns the response; the reply format can be changed with the optional extension (.json
, .txt
…)
200 OK
.304 Not Modified
when If-None-Match
is sent with the same ETag.403 Forbidden
.405 Method Not Allowed
.
Because the URI format is quite limited, Webdis can read its last argument from a file when it is sent using HTTP PUT. To do this with cURL, use curl --upload-file my-data.bin http://127.0.0.1:7379/SET/my-key
. Note how the SET command has only one parameter instead of two, the last one being the file’s data.
?jsonp
query string parameter adds an optional wrapping function, transforming the reply into a JSONP call. This makes it possible to include Webdis in Javascript apps.
.txt
extension, served as text/plain
. Only strings are returned..msg
extension, served as application/x-msgpack
..raw
extension.?type=
query string parameter allows you to serve strings as any content-type.
"acl": [
{
"disabled": ["SET", "DEBUG", "FLUSHDB", "FLUSHALL"]
},
{
"ip": "192.168.0.0/16",
"enabled": ["SET"]
},
{
"http_basic_auth": "root:p4ssw0rd1",
"enabled": ["FLUSHDB"]
}
]