pub enum HttpMethod {
GET,
POST,
PUT,
PATCH,
DELETE,
HEAD,
OPTIONS,
TRACE,
CONNECT,
}
Expand description
The Http methods
Variants§
GET
The GET method is used to retrieve data from a server.
POST
The POST method is used to submit data to a server.
PUT
The PUT method is used to replace all existing data on a server with the provided data.
PATCH
The PATCH method is used to update a specific part of a resource on a server.
DELETE
The DELETE method is used to delete a resource from a server.
HEAD
The HEAD method is used to retrieve only the headers of a resource, without the actual data.
OPTIONS
The OPTIONS method is used to retrieve the capabilities of a server.
TRACE
The TRACE method is used to echo the received request back to the client. (Rarely used)
CONNECT
The CONNECT method is used to establish a tunnel through the proxy server. (For use with secure proxies)
Trait Implementations§
Source§impl Clone for HttpMethod
impl Clone for HttpMethod
Source§fn clone(&self) -> HttpMethod
fn clone(&self) -> HttpMethod
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HttpMethod
impl Debug for HttpMethod
Source§impl Default for HttpMethod
impl Default for HttpMethod
Source§fn default() -> HttpMethod
fn default() -> HttpMethod
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HttpMethod
impl RefUnwindSafe for HttpMethod
impl Send for HttpMethod
impl Sync for HttpMethod
impl Unpin for HttpMethod
impl UnwindSafe for HttpMethod
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more