diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2024-06-05 19:10:30 +0300 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2024-06-05 19:10:30 +0300 |
| commit | 07c54da628ec776627e68c25196539389c8d965c (patch) | |
| tree | 30255789673c09d4a74e8372796f8ba4988cf4f4 /src/http_types.rs | |
| parent | ff75fa542a98cf9a79133a81b7716401e717bfd6 (diff) | |
| download | tiny-server-07c54da628ec776627e68c25196539389c8d965c.tar.xz tiny-server-07c54da628ec776627e68c25196539389c8d965c.zip | |
codecrafters submit [skip ci]
Diffstat (limited to 'src/http_types.rs')
| -rw-r--r-- | src/http_types.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/http_types.rs b/src/http_types.rs index a196f25..79bf015 100644 --- a/src/http_types.rs +++ b/src/http_types.rs @@ -4,6 +4,7 @@ use std::collections::HashMap; pub enum StatusCode { // 2xx Success Ok, + Created, // 4xx Client Error BadRequest, @@ -36,6 +37,7 @@ impl From<StatusCode> for String { use StatusCode::*; match val { Ok => "200 OK".to_string(), + Created => "201 Created".to_string(), BadRequest => "400 Bad Request".to_string(), NotFound => "404 Not Found".to_string(), } |
