Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
http1.cc File Reference
#include "symbian/http/http1.h"
#include <algorithm>
#include <array>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <optional>
#include <string>
#include <string_view>
#include <vector>

Namespaces

namespace  symbian
 
namespace  symbian::http
 
namespace  symbian::http::internal
 

Functions

std::optional< std::size_t > symbian::http::internal::FindHeaderBlockEnd (std::string_view data)
 
absl::StatusOr< Http1RequestHead > symbian::http::internal::ParseRequestHead (std::string_view head_block)
 Parses a request head (start line + headers, no trailing CRLFCRLF needed).
 
absl::StatusOr< Http1ResponseHead > symbian::http::internal::ParseResponseHead (std::string_view head_block)
 Parses a response head (status line + headers).
 
absl::StatusOr< BodyPlan > symbian::http::internal::PlanRequestBody (const Headers &headers)
 
absl::StatusOr< BodyPlan > symbian::http::internal::PlanResponseBody (std::string_view request_method, int status, const Headers &headers)
 
std::string symbian::http::internal::EncodeChunk (std::string_view data)
 
std::string symbian::http::internal::EncodeLastChunk (const Headers &trailers)
 
void symbian::http::internal::AppendHeaderBlock (const Headers &headers, std::string *out)
 Appends "name: value\r\n" for each header to out (names sent as given).
 
std::string symbian::http::internal::SerializeRequest (std::string_view method, std::string_view target, const Headers &headers)
 Serializes an HTTP/1.1 request head (start line + headers + CRLF).
 
std::string symbian::http::internal::SerializeResponse (int status, const Headers &headers, std::string_view reason={})
 Serializes an HTTP/1.1 response head (status line + headers + CRLF).
 
std::string_view symbian::http::internal::DefaultReasonPhrase (int status)