lucid-kv / lucid

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

[PUT] Method not allowed. #29

Closed imclint21 closed 4 years ago

imclint21 commented 4 years ago

Hi,

I try to store a an object using the PUT method and I get a 405 error, and also when I change the JWT token (or remove it) nothing changes, I still have this error!

{
    "message": "Method not allowed."
}

Screenshot:

image

I'm on the warp-migration branch.

Best regards

shuni64 commented 4 years ago

Seems like I misunderstood how the API is supposed to work because nickel didn't separate path parameters from query parameters. The /api/kv/ endpoint returned a 405 error because the routing doesn't have a proper 404 fallback yet, but that's another problem. a7108df544fa0383a0f159bb7bbad4de8e7e9d94 changes the structure of the api routing to strictly use path parameters instead of query parameters, so this should be fixed now.

imclint21 commented 4 years ago

Ah, I just tried now and it works perfectly!

Thank you