barrel_server_http (barrel_server v1.5.0)
View SourceREST/JSON HTTP surface for the barrel edge database.
One livery router served over HTTP/1.1 and HTTP/2. Every handler reads path bindings and the request body, calls the barrel module through barrel_server_dbs, and renders JSON. Documents, attachments, vectors, search, and the changes feed (JSON or SSE) are exposed.
Summary
Functions
Body is optional (an empty body is #{}, not an error, same as with_json everywhere else) -- a plain PUT /db/:name keeps behaving exactly as before. att_opts picks a non-default attachment backend (e.g. S3); see att_opts_from_json/1.
If-None-Match: * / If-Match: <etag> opt into S3 conditional writes (create_only/expected_etag -- see barrel_att_s3_store); a backend that can't evaluate them (Garage) or doesn't understand them at all (the default RocksDB backend) is handled by the callee, not here.
Functions
Body is optional (an empty body is #{}, not an error, same as with_json everywhere else) -- a plain PUT /db/:name keeps behaving exactly as before. att_opts picks a non-default attachment backend (e.g. S3); see att_opts_from_json/1.
If-None-Match: * / If-Match: <etag> opt into S3 conditional writes (create_only/expected_etag -- see barrel_att_s3_store); a backend that can't evaluate them (Garage) or doesn't understand them at all (the default RocksDB backend) is handled by the callee, not here.