Closed hkui closed 3 years ago
What should be generated?
What should be generated?
/book/_doc/1
The proper signature for delete
is:
public function delete($index, $type, $id, $options = [])
So, $connect->createCommand()->delete('book', '_doc', 1)
.
What steps will reproduce the problem?
What's expected?
What do you get instead?
{"error":"Incorrect HTTP method for uri [/book/_doc/?id=1] and method [DELETE], allowed: [POST]","status":405}
Additional info
It is mainly the problem of splicing URL when use the below function
The URL it generates is "/book/_doc/?id=1"
How can I use delete () correctly?