Skip to content
CryoCryo home
Stdlibnet::http

method

import std::net::http::method; · source

Method

type enum Method {
    Get;
    Head;
    Post;
    Put;
    Delete;
    Connect;
    Options;
    Trace;
    Patch;
}

implement enum Method {
    as_str(&this) -> Str;
    static parse(source: Str) -> Result<Method, ConversionError>;
    static parse_opt(source: Str) -> Option<Method>;
}

The standard verbs. as_str gives the wire spelling; parse and parse_opt read one — parse reports an unknown verb as a ConversionError, parse_opt as None.