'What is LIST method in http request?

There is a code snippet in vault api doc:

$ curl \
    --header "X-Vault-Token: ..." \
    --request LIST \
    http://127.0.0.1:8200/v1/ssh/roles

What is LIST method in http request? I have never heard about this http method before.



Solution 1:[1]

You've never heard of LIST before because it's a custom method.

curl's --request flag sets a custom request method but in name only.

--request

Specifies a custom request method to use when communicating with the HTTP server. ... Normally you don't need this option... [it] only changes the actual word used in the HTTP request...

https://man7.org/linux/man-pages/man1/curl.1.html

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rhinosforhire