lucid-kv / lucid

High performance and distributed KV store w/ REST API. 🦀
https://clintnetwork.gitbook.io/lucid/
MIT License
378 stars 31 forks source link

[Manifest] About some operations (like LOCK, EXPIRE etc) #44

Closed imclint21 closed 4 years ago

imclint21 commented 4 years ago

Hey,

Actually, the PATCH method is used to make special operations like this with a JSON object that define the operation and properties!

Maybe we can use some HTTP methods like LOCK / UNLOCK or an other way.

Actions Performing

This is some propositions to perform some operations.

Inline:

curl -XPATCH -d 'LOCK' 'https://localhost:7021/api/kv/hello_world'

Parameters:

curl -XPATCH -d 'operation=lock' 'https://localhost:7021/api/kv/hello_world'

Json:

curl -XPATCH -d '{"operation": "LOCK"}' 'https://localhost:7021/api/kv/hello_world'

Best regards

imclint21 commented 4 years ago

There are some things that could be great to have: