diff options
| author | Stefan Boberg <[email protected]> | 2021-09-10 19:48:31 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-10 19:48:31 +0200 |
| commit | f63296d7a92023a28a545ff5c34d4adb952d0b1f (patch) | |
| tree | 3d7b491835e117a8a4108aeb6092f06470443ec2 /zenhttp/httpserver.cpp | |
| parent | Added beginnings of a uWS http front-end (diff) | |
| parent | Refactored HTTP request handling to scale better (diff) | |
| download | zen-f63296d7a92023a28a545ff5c34d4adb952d0b1f.tar.xz zen-f63296d7a92023a28a545ff5c34d4adb952d0b1f.zip | |
Merge branch 'cbpackage-update' of https://github.com/EpicGames/zen into cbpackage-update
Diffstat (limited to 'zenhttp/httpserver.cpp')
| -rw-r--r-- | zenhttp/httpserver.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/zenhttp/httpserver.cpp b/zenhttp/httpserver.cpp index d1893dc6e..73345ac7e 100644 --- a/zenhttp/httpserver.cpp +++ b/zenhttp/httpserver.cpp @@ -25,6 +25,35 @@ namespace zen { +using namespace std::literals; + +std::string_view +MapContentTypeToString(HttpContentType ContentType) +{ + switch (ContentType) + { + default: + case HttpContentType::kUnknownContentType: + case HttpContentType::kBinary: + return "application/octet-stream"sv; + + case HttpContentType::kText: + return "text/plain"sv; + + case HttpContentType::kJSON: + return "application/json"sv; + + case HttpContentType::kCbObject: + return "application/x-ue-cb"sv; + + case HttpContentType::kCbPackage: + return "application/x-ue-cbpkg"sv; + + case HttpContentType::kYAML: + return "text/yaml"sv; + } +} + HttpServerRequest::HttpServerRequest() { } |