micro-http: added MethodNotAllow status code

When server returns `Method Not Allow` responses,
it can attach to the response a HTTP `Allow` header.
Added support for HTTP response `Allow` header as
well.

Signed-off-by: Iulian Barbu <iul@amazon.com>
Signed-off-by: YUAN LYU <lyuyuan92@gmail.com>
This commit is contained in:
Iulian Barbu
2020-04-29 14:30:00 +03:00
committed by Adrian Catangiu
parent 530b36bfd9
commit d37f9671af
2 changed files with 69 additions and 4 deletions

View File

@@ -142,7 +142,7 @@ impl Body {
}
/// Supported HTTP Methods.
#[derive(Clone, Copy, Debug, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum Method {
/// GET Method.
Get,