Sese Framework
2.3.0
A cross-platform framework
|
HTTP Utility Class. More...
#include <HttpUtil.h>
Public Types | |
using | InputStream = io::InputStream |
using | OutputStream = io::OutputStream |
Static Public Member Functions | |
static bool | recvRequest (InputStream *source, RequestHeader *request) noexcept |
Receive a request from a stream. | |
static bool | sendRequest (OutputStream *dest, RequestHeader *request) noexcept |
Send a request to a stream. | |
static bool | recvResponse (InputStream *source, ResponseHeader *response) noexcept |
Receive a response from a stream. | |
static bool | sendResponse (OutputStream *dest, ResponseHeader *response) noexcept |
Send a response to a stream. | |
static Cookie::Ptr | parseFromSetCookie (const std::string &text) noexcept |
static CookieMap::Ptr | parseFromCookie (const std::string &text) noexcept |
Static Public Attributes | |
static std::map< std::string, std::string > | content_type_map |
Content-Type extension mapping. | |
Static Private Member Functions | |
static bool | getLine (InputStream *source, text::StringBuilder &builder) noexcept |
static bool | recvHeader (InputStream *source, text::StringBuilder &builder, Header *header, bool is_resp=false) noexcept |
static bool | sendHeader (OutputStream *dest, Header *header, bool is_resp=false) noexcept |
static bool | sendSetCookie (OutputStream *dest, const CookieMap::Ptr &cookies) noexcept |
static bool | sendCookie (OutputStream *dest, const CookieMap::Ptr &cookies) noexcept |
HTTP Utility Class.
|
staticprivatenoexcept |
References sese::text::AbstractStringBuffer::append(), and HTTP_MAX_SINGLE_LINE.
|
staticnoexcept |
References sese::text::AbstractStringBuffer::split().
Referenced by sese::net::http::HPackUtil::decode().
|
staticnoexcept |
References COMPARE, and sese::text::AbstractStringBuffer::split().
|
inlinestaticprivatenoexcept |
References sese::net::http::CookieMap::add(), and strcasecmp.
|
staticnoexcept |
Receive a request from a stream.
source | Target source |
request | Request |
References sese::text::AbstractStringBuffer::clear(), sese::text::AbstractStringBuffer::split(), and sese::net::http::stringToRequestType().
|
staticnoexcept |
Receive a response from a stream.
source | Target source |
response | Response |
References _atoi64, sese::text::AbstractStringBuffer::clear(), and sese::text::AbstractStringBuffer::split().
Referenced by sese::internal::net::http::HttpClientImpl::request().
|
inlinestaticprivatenoexcept |
References WRITE.
|
inlinestaticprivatenoexcept |
References WRITE.
|
staticnoexcept |
Send a request to a stream.
dest | Destination stream |
request | Request |
References sese::net::http::requestTypeToString().
Referenced by sese::internal::net::http::HttpClientImpl::request().
|
staticnoexcept |
Send a response to a stream.
dest | Destination stream |
response | Response |
Referenced by sese::internal::service::http::HttpConnection::handleRequest().
|
inlinestaticprivatenoexcept |
References sese::text::DateTimeFormatter::format(), TIME_GREENWICH_MEAN_PATTERN, and WRITE.
|
static |
Content-Type extension mapping.
Referenced by sese::internal::service::http::HttpServiceImpl::handleRequest().