pub enum Method {
Get,
Post,
Put,
}Expand description
The HTTP verb a command is sent with.
Which one a command wants is not a matter of taste. The HTTP proxy reference gives the rule outright:
If the command has an input data stream, then PUT. If the command is mutating, then POST. Otherwise GET.
Those three properties are declared per command in the cluster’s own driver
registry, so the answer for a command this crate does not model is a lookup
rather than a guess: write_table takes a data stream and is a PUT, create
mutates and is a POST, get and get_supported_features do neither and are
GETs.
Public because Client::raw_command cannot
choose for a command it has never heard of.
Variants§
Get
A command that neither mutates nor takes an input stream.
Post
A mutating command with no input stream — most of API v4.
Put
A command with an input data stream: write_table, write_file.