CCF
Loading...
Searching...
No Matches
http_status.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
5#include <llhttp/llhttp.h>
6
7namespace ccf
8{
9 using http_status = llhttp_status;
10
11 /* Returns a string version of the HTTP status code. */
12 static inline const char* http_status_str(http_status s)
13 {
14 return llhttp_status_name(s);
15 }
16
17 static inline bool is_http_status_client_error(http_status s)
18 {
19 return s >= 400 && s < 500;
20 }
21}
Definition app_interface.h:14
llhttp_status http_status
Definition http_status.h:9