-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PreparedQuery Delete API is a "Query" rather than a "Write" #1591
Comments
Also, the PreparedQuery Delete API is a "Query" rather than a "Write": https://github.com/hashicorp/consul/blob/master/api/prepared_query.go#L149 (compared to KV: https://github.com/hashicorp/consul/blob/master/api/kv.go#L199) |
Hi @highlyunavailable since this was a totally new API we wanted to be more REST-y, similar to the KV store, but we decided to separate out the create from the update operation since the ID is always generated by the Consul and never passed in when the query is created. It definitely could have been a PUT, but was sort of a style choice. The API options thing is a bug, thanks for finding that! |
Okay, fair enough. It wasn't a big deal, I just wondered because it was different. Thanks! I edited the title of the issue to be the actual bug. |
Is there any specific reason the PreparedQuery create API is a POST when every other API in Consul uses PUT for create/update (including the prepared query update API)?
Just something I discovered when adding this for the C# API and wondered about.
The text was updated successfully, but these errors were encountered: