SNode.C
Loading...
Searching...
No Matches
web::http Namespace Reference

Namespaces

namespace  client
 
namespace  decoder
 
namespace  legacy
 
namespace  server
 
namespace  tls
 

Classes

struct  ciLess
 
class  CiStringMap
 
class  ContentDecoder
 
class  CookieOptions
 
class  MimeTypes
 
class  Parser
 
class  SocketContextFactory
 
class  SocketContextUpgrade
 
class  SocketContextUpgradeFactory
 
class  SocketContextUpgradeFactorySelector
 
class  StatusCode
 

Enumerations

enum  ConnectionState { Default , Keep , Close }
 
enum struct  TransferEncoding {
  HTTP10 , Identity , Chunked , Compressed ,
  GZip , Deflat
}
 
enum  ContentType { Normal , EventStream }
 

Functions

bool ciContains (const std::string &str1, const std::string &str2)
 
bool ciEquals (const std::string &str1, const std::string &str2)
 
enum Parser::HTTPCompliance operator| (const enum Parser::HTTPCompliance &c1, const enum Parser::HTTPCompliance &c2)
 
enum Parser::HTTPCompliance operator& (const enum Parser::HTTPCompliance &c1, const enum Parser::HTTPCompliance &c2)
 

Enumeration Type Documentation

◆ ConnectionState

Enumerator
Default 
Keep 
Close 

Definition at line 51 of file ConnectionState.h.

◆ ContentType

Enumerator
Normal 
EventStream 

Definition at line 51 of file ContentType.h.

◆ TransferEncoding

Function Documentation

◆ ciContains()

bool web::http::ciContains ( const std::string &  str1,
const std::string &  str2 
)

Definition at line 53 of file CiStringMap.cpp.

53 {
54 auto it = std::search(str1.begin(), str1.end(), str2.begin(), str2.end(), [](char ch1, char ch2) {
55 return std::tolower(ch1) == std::tolower(ch2);
56 });
57
58 return (it != str1.end());
59 }

Referenced by web::http::Parser::analyzeHeader(), web::http::client::ResponseParser::analyzeHeader(), web::http::server::RequestParser::analyzeHeader(), web::http::client::MasterRequest::requestEventSource(), web::http::client::SocketContext::requestPrepared(), web::http::server::SocketContext::responseStarted(), web::http::server::Response::sendFragment(), web::http::client::Request::set(), web::http::server::Response::set(), web::http::server::Response::upgrade(), and web::http::client::Request::upgrade().

Here is the caller graph for this function:

◆ ciEquals()

bool web::http::ciEquals ( const std::string &  str1,
const std::string &  str2 
)

Definition at line 61 of file CiStringMap.cpp.

61 {
62 return std::equal(str1.begin(), str1.end(), str2.begin(), str2.end(), [](char ch1, char ch2) {
63 return std::tolower(ch1) == std::tolower(ch2);
64 });
65 }

Referenced by web::http::client::Request::set(), and web::http::server::Response::set().

Here is the caller graph for this function:

◆ operator&()

enum Parser::HTTPCompliance web::http::operator& ( const enum Parser::HTTPCompliance c1,
const enum Parser::HTTPCompliance c2 
)

Definition at line 258 of file Parser.cpp.

258 {
259 return static_cast<enum Parser::HTTPCompliance>(static_cast<unsigned short>(c1) & static_cast<unsigned short>(c2));
260 }

◆ operator|()

enum Parser::HTTPCompliance web::http::operator| ( const enum Parser::HTTPCompliance c1,
const enum Parser::HTTPCompliance c2 
)

Definition at line 254 of file Parser.cpp.

254 {
255 return static_cast<enum Parser::HTTPCompliance>(static_cast<unsigned short>(c1) | static_cast<unsigned short>(c2));
256 }