| 1 | #include "httpcodes.h" |
| 2 | |
| 3 | TStringBuf HttpCodeStrEx(int code) noexcept { |
| 4 | switch (code) { |
| 5 | case HTTP_CONTINUE: |
| 6 | return TStringBuf("100 Continue"); |
| 7 | case HTTP_SWITCHING_PROTOCOLS: |
| 8 | return TStringBuf("101 Switching protocols"); |
| 9 | case HTTP_PROCESSING: |
| 10 | return TStringBuf("102 Processing"); |
| 11 | case HTTP_EARLY_HINTS: |
| 12 | return TStringBuf ("103 Early Hints"); |
| 13 | |
| 14 | case HTTP_OK: |
| 15 | return TStringBuf("200 Ok"); |
| 16 | case HTTP_CREATED: |
| 17 | return TStringBuf("201 Created"); |
| 18 | case HTTP_ACCEPTED: |
| 19 | return TStringBuf("202 Accepted"); |
| 20 | case HTTP_NON_AUTHORITATIVE_INFORMATION: |
| 21 | return TStringBuf("203 None authoritative information"); |
| 22 | case HTTP_NO_CONTENT: |
| 23 | return TStringBuf("204 No content"); |
| 24 | case HTTP_RESET_CONTENT: |
| 25 | return TStringBuf("205 Reset content"); |
| 26 | case HTTP_PARTIAL_CONTENT: |
| 27 | return TStringBuf("206 Partial content"); |
| 28 | case HTTP_MULTI_STATUS: |
| 29 | return TStringBuf("207 Multi status"); |
| 30 | case HTTP_ALREADY_REPORTED: |
| 31 | return TStringBuf("208 Already reported"); |
| 32 | case HTTP_IM_USED: |
| 33 | return TStringBuf("226 IM used"); |
| 34 | |
| 35 | case HTTP_MULTIPLE_CHOICES: |
| 36 | return TStringBuf("300 Multiple choices"); |
| 37 | case HTTP_MOVED_PERMANENTLY: |
| 38 | return TStringBuf("301 Moved permanently"); |
| 39 | case HTTP_FOUND: |
| 40 | return TStringBuf("302 Moved temporarily"); |
| 41 | case HTTP_SEE_OTHER: |
| 42 | return TStringBuf("303 See other"); |
| 43 | case HTTP_NOT_MODIFIED: |
| 44 | return TStringBuf("304 Not modified"); |
| 45 | case HTTP_USE_PROXY: |
| 46 | return TStringBuf("305 Use proxy"); |
| 47 | case HTTP_TEMPORARY_REDIRECT: |
| 48 | return TStringBuf("307 Temporarily redirect"); |
| 49 | case HTTP_PERMANENT_REDIRECT: |
| 50 | return TStringBuf("308 Permanent redirect"); |
| 51 | |
| 52 | case HTTP_BAD_REQUEST: |
| 53 | return TStringBuf("400 Bad request"); |
| 54 | case HTTP_UNAUTHORIZED: |
| 55 | return TStringBuf("401 Unauthorized"); |
| 56 | case HTTP_PAYMENT_REQUIRED: |
| 57 | return TStringBuf("402 Payment required"); |
| 58 | case HTTP_FORBIDDEN: |
| 59 | return TStringBuf("403 Forbidden"); |
| 60 | case HTTP_NOT_FOUND: |
no outgoing calls
no test coverage detected