Orbit Framework
An ultra-modern, asynchronous, cross-platform C++ Web Framework.
Loading...
Searching...
No Matches
http Namespace Reference

Namespaces

namespace  h2
 
namespace  websocket
 

Classes

struct  Cookie
 Represents an HTTP cookie. More...
 
class  HttpParser
 Utility class for parsing HTTP requests and related components. More...
 
struct  HttpRequest
 Represents an incoming HTTP request. More...
 
class  HttpResponse
 Represents an HTTP response to be sent to a client. More...
 
struct  MultipartFile
 Represents a file uploaded via multipart/form-data. More...
 
class  MultipartForm
 Represents parsed multipart/form-data content. More...
 
class  MultipartStreamParser
 Streaming parser for multipart/form-data. More...
 
class  ResponseWriter
 Abstract interface for writing HTTP responses. More...
 

Enumerations

enum class  HttpMethod {
  GET , POST , PUT , PATCH ,
  DELETE , OPTIONS , HEAD , UNKNOWN
}
 Represents standard HTTP methods. More...
 
enum class  HttpStatus {
  SwitchingProtocols = 101 , OK = 200 , Created = 201 , NoContent = 204 ,
  MovedPermanently = 301 , Found = 302 , NotModified = 304 , BadRequest = 400 ,
  Unauthorized = 401 , Forbidden = 403 , NotFound = 404 , PayloadTooLarge = 413 ,
  TooManyRequests = 429 , RequestHeaderFieldsTooLarge = 431 , UnprocessableEntity = 422 , InternalServerError = 500
}
 Standard HTTP status codes. More...
 

Functions

bool connection_option_present (std::string_view field_value, std::string_view option)
 Tests whether a Connection header field carries a given option.
 

Enumeration Type Documentation

◆ HttpMethod

enum class http::HttpMethod
strong

Represents standard HTTP methods.

Enumerator
GET 
POST 
PUT 
PATCH 
DELETE 
OPTIONS 
HEAD 
UNKNOWN 

◆ HttpStatus

enum class http::HttpStatus
strong

Standard HTTP status codes.

Enumerator
SwitchingProtocols 
OK 
Created 
NoContent 
MovedPermanently 
Found 
NotModified 
BadRequest 
Unauthorized 
Forbidden 
NotFound 
PayloadTooLarge 
TooManyRequests 
RequestHeaderFieldsTooLarge 
UnprocessableEntity 
InternalServerError 

Function Documentation

◆ connection_option_present()

bool http::connection_option_present ( std::string_view  field_value,
std::string_view  option 
)

Tests whether a Connection header field carries a given option.

The Connection header is a comma-separated list of case-insensitive tokens (RFC 9110 section 7.6.1), so a client may legitimately send Connection: keep-alive, TE or Connection: Close. Comparing the whole field value against a single token misses both.

Parameters
field_valueThe raw Connection header value.
optionThe option to look for, in lowercase (e.g. "close").
Returns
True if the option appears as one of the listed tokens.