Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
httpstatus.h
Go to the documentation of this file.
1
#pragma once
2
#ifndef HTTP_HTTPSTATUS_H
3
#define HTTP_HTTPSTATUS_H
4
//------------------------------------------------------------------------------
14
#include "
util/string.h
"
15
16
//------------------------------------------------------------------------------
17
namespace
Http
18
{
19
class
HttpStatus
20
{
21
public
:
23
enum
Code
24
{
25
Continue
= 100,
26
OK
= 200,
27
BadRequest
= 400,
28
Forbidden
= 403,
29
NotFound
= 404,
30
MethodNotAllowed
= 405,
31
NotAcceptable
= 406,
32
InternalServerError
= 500,
33
NotImplemented
= 501,
34
ServiceUnavailable
= 503,
35
36
InvalidHttpStatus
= 0xffff
37
};
38
40
static
Code
FromString
(
const
Util::String
& str);
42
static
Util::String
ToString
(
Code
c);
44
static
Code
FromLong
(
long
l);
46
static
Util::String
ToHumanReadableString
(
Code
c);
47
};
48
49
}
// namespace Http
50
//------------------------------------------------------------------------------
51
#endif
Http::HttpStatus
HTTP status code enumeration (e.g.
Definition
httpstatus.h:20
Http::HttpStatus::FromLong
static Code FromLong(long l)
convert from long
Definition
httpstatus.cc:38
Http::HttpStatus::FromString
static Code FromString(const Util::String &str)
convert from string
Definition
httpstatus.cc:17
Http::HttpStatus::ToString
static Util::String ToString(Code c)
convert to string
Definition
httpstatus.cc:60
Http::HttpStatus::Code
Code
status codes
Definition
httpstatus.h:24
Http::HttpStatus::Continue
@ Continue
Definition
httpstatus.h:25
Http::HttpStatus::ServiceUnavailable
@ ServiceUnavailable
Definition
httpstatus.h:34
Http::HttpStatus::BadRequest
@ BadRequest
Definition
httpstatus.h:27
Http::HttpStatus::MethodNotAllowed
@ MethodNotAllowed
Definition
httpstatus.h:30
Http::HttpStatus::NotAcceptable
@ NotAcceptable
Definition
httpstatus.h:31
Http::HttpStatus::Forbidden
@ Forbidden
Definition
httpstatus.h:28
Http::HttpStatus::InvalidHttpStatus
@ InvalidHttpStatus
Definition
httpstatus.h:36
Http::HttpStatus::InternalServerError
@ InternalServerError
Definition
httpstatus.h:32
Http::HttpStatus::NotImplemented
@ NotImplemented
Definition
httpstatus.h:33
Http::HttpStatus::NotFound
@ NotFound
Definition
httpstatus.h:29
Http::HttpStatus::OK
@ OK
Definition
httpstatus.h:26
Http::HttpStatus::ToHumanReadableString
static Util::String ToHumanReadableString(Code c)
convert code to human readable string
Definition
httpstatus.cc:82
Http
This file was generated with Nebula Trifid's idlc compiler tool.
Definition
defaulthttprequesthandler.cc:15
string.h
Util.String
Nebula's universal string class.
Definition
String.cs:8
code
foundation
http
httpstatus.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.