Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
Group_http

Classes

struct  SC::HttpAsyncClientTransportSetup
 Mutable transport setup view used by HttpAsyncClient after the TCP socket connects. More...
 
struct  SC::HttpAsyncClientConnection< ReadQueue, WriteQueue, HeaderBytes, StreamBytes >
 
struct  SC::HttpAsyncClientTlsOptions
 TLS policy for HttpAsyncClient HTTPS requests. More...
 
struct  SC::HttpAsyncClient
 Asynchronous HTTP/1.1 client using caller-provided fixed storage. More...
 
struct  SC::HttpMultipartWriter
 
struct  SC::HttpConnectionBase
 Shared async transport storage for HTTP client and server endpoints. More...
 
struct  SC::HttpIncomingMessage
 Incoming message from the perspective of the participants of an HTTP transaction. More...
 
struct  SC::HttpRequest
 Incoming HTTP request received by the server. More...
 
struct  SC::HttpAsyncClientResponse
 Incoming HTTP response received by the client. More...
 
struct  SC::HttpOutgoingMessage
 Outgoing message from the perspective of the participants of an HTTP transaction. More...
 
struct  SC::HttpResponse
 Outgoing HTTP response sent by the server. More...
 
struct  SC::HttpAsyncClientRequest
 Outgoing HTTP request sent by the client. More...
 
struct  SC::HttpConnection
 Http connection abstraction holding both the incoming and outgoing messages in an HTTP transaction. More...
 
struct  SC::SpanWithStride< Type >
 View over a contiguous sequence of items with a custom stride between elements. More...
 
struct  SC::HttpConnectionsPool
 A pool of HttpConnection that can be active or inactive. More...
 
struct  SC::HttpStaticConnection< ReadQueue, WriteQueue, HeaderBytes, StreamBytes, ExtraBuffers, BaseClass >
 Adds compile-time configurable read and write queues to any class subclassing HttpConnectionBase. More...
 
struct  SC::HttpHeaderKeyValue
 A zero-copy key/value view used by lightweight HTTP header helpers. More...
 
struct  SC::HttpCookieIterator
 Iterates a request Cookie header as semicolon-delimited name/value pairs. More...
 
struct  SC::HttpSetCookieAttributeIterator
 Iterates semicolon-delimited Set-Cookie attributes after the first name/value pair. More...
 
struct  SC::HttpSetCookieView
 Zero-copy view of one Set-Cookie header value. More...
 
struct  SC::HttpSetCookieBuilder
 Writes a Set-Cookie header value into caller-provided storage. More...
 
struct  SC::HttpCacheControlBuilder
 Writes a Cache-Control header value into caller-provided storage. More...
 
struct  SC::HttpAuthorizationView
 Zero-copy view of an Authorization header split into scheme and credentials. More...
 
struct  SC::HttpMultipartContentDispositionView
 Zero-copy view of a Content-Disposition multipart header value. More...
 
struct  SC::HttpMultipartPartHeadersView
 Zero-copy view over common multipart part headers. More...
 
struct  SC::HttpMultipartParser
 Incremental HTTP multipart/form-data parser. More...
 
struct  SC::HttpParser
 Incremental HTTP request or response parser. More...
 
struct  SC::HttpRouteParam
 
struct  SC::HttpRoute
 
struct  SC::HttpRouteMatch
 
struct  SC::HttpRouter
 Tiny allocation-free method/path router over caller-owned routes. More...
 
struct  SC::HttpURLQueryItem
 One raw query string item parsed from a URL search component. More...
 
struct  SC::HttpURLQueryIterator
 Iterates raw query string items without allocation or percent-decoding. More...
 
struct  SC::HttpFormUrlEncodedIterator
 Iterates raw application/x-www-form-urlencoded name/value pairs without decoding. More...
 
struct  SC::HttpRequestTargetView
 Zero-copy view over an HTTP origin-form request target. More...
 
struct  SC::HttpURLParser
 Parse an URL splitting it into its base components. More...
 
struct  SC::HttpWebSocketFrameHeaderView
 Parsed or to-be-written WebSocket frame header. More...
 
struct  SC::HttpWebSocketTransportView
 Minimal transport handoff shape for later HTTP upgrade integration. More...
 
struct  SC::HttpWebSocketServerHandshakeRequestView
 Normalized server-side WebSocket opening handshake data. More...
 
struct  SC::HttpWebSocketClientHandshakeResponseView
 Normalized client-side WebSocket opening handshake response data. More...
 
struct  SC::HttpWebSocketHandshakeResult
 Outcome of validating a WebSocket opening handshake. More...
 
struct  SC::HttpWebSocketHandshake
 Dependency-free RFC 6455 opening handshake helpers. More...
 
struct  SC::HttpWebSocketClientHandshake
 Small client-side helper that upgrades an HttpAsyncClient connection to a WebSocket transport. More...
 
struct  SC::HttpWebSocketFrameReader
 Incremental WebSocket frame reader operating on caller-owned mutable byte slices. More...
 
struct  SC::HttpWebSocketFrameWriter
 Incremental WebSocket frame writer operating on caller-owned header storage and payload buffers. More...
 
struct  SC::HttpWebSocketMessageAssembler
 Optional caller-buffered message assembly helper for applications that want complete messages. More...
 
struct  SC::HttpWebSocketEndpoint
 Small frame-lifecycle helper for ping / pong, close, and explicit fixed-buffer send backpressure. More...
 
struct  SC::HttpWebSocketConnectionPump
 Optional stream pump that binds a WebSocket transport to an endpoint lifecycle. More...
 
struct  SC::HttpWebSocketHubClient
 Fixed-slot WebSocket hub client entry. More...
 
struct  SC::HttpWebSocketSmallHub
 Small fixed-capacity broadcast helper for server-side WebSocket fan-out. More...
 

Enumerations

enum class  HttpBodyFramingKind : uint8_t {
  None ,
  ContentLength ,
  Chunked ,
  CloseDelimited
}
 
enum class  HttpContentEncoding : uint8_t {
  Identity ,
  GZip ,
  Deflate
}
 
enum class  HttpRouteMatchStatus {
  Matched ,
  MethodNotAllowed ,
  NotFound ,
  TooManyParams
}
 
enum class  SC::HttpWebSocketOpcode : uint8_t {
  Continuation = 0x0 ,
  Text = 0x1 ,
  Binary = 0x2 ,
  Close = 0x8 ,
  Ping = 0x9 ,
  Pong = 0xA
}
 WebSocket frame opcode as defined by RFC 6455. More...
 
enum class  SC::HttpWebSocketEndpointRole : uint8_t {
  Client ,
  Server
}
 Identifies the local endpoint role to validate masking rules. More...
 

Functions

SC_HTTP_EXPORT StringSpan SC::httpContentEncodingName (HttpContentEncoding encoding)
 
SC_HTTP_EXPORT Result SC::httpContentEncodingFromHeader (StringSpan headerValue, HttpContentEncoding &encoding)
 
SC_HTTP_EXPORT StringSpan SC::HttpContentTypeTextPlainUtf8 ()
 Common Content-Type header values.
 
SC_HTTP_EXPORT StringSpan SC::HttpContentTypeTextHtmlUtf8 ()
 
SC_HTTP_EXPORT StringSpan SC::HttpContentTypeApplicationJson ()
 
SC_HTTP_EXPORT StringSpan SC::HttpContentTypeApplicationOctetStream ()
 
SC_HTTP_EXPORT Result SC::HttpParseBearerToken (StringSpan authorizationHeader, StringSpan &token)
 Parses a Bearer Authorization header and returns the raw token slice.
 
SC_HTTP_EXPORT Result SC::HttpParseBasicCredentials (StringSpan authorizationHeader, Span< char > storage, StringSpan &username, StringSpan &password)
 Parses Basic Authorization credentials into caller-provided decoded storage.
 
SC_HTTP_EXPORT Result SC::HttpWriteBearerAuthorization (StringSpan token, Span< char > storage, StringSpan &output)
 Writes Bearer <token> into caller-provided storage.
 
SC_HTTP_EXPORT Result SC::HttpWriteBasicAuthorization (StringSpan base64Credentials, Span< char > storage, StringSpan &output)
 Writes Basic <base64Credentials> into caller-provided storage.
 
SC_HTTP_EXPORT Result SC::HttpWriteBasicAuthorizationCredentials (StringSpan username, StringSpan password, Span< char > storage, StringSpan &output)
 Writes Basic <base64(username:password)> into caller-provided storage.
 
SC_HTTP_EXPORT bool SC::HttpMultipartIsSafeFileName (StringSpan fileName)
 Conservative multipart filename safety check for upload sinks.
 
SC_HTTP_EXPORT Result SC::HttpPercentDecode (StringSpan input, Span< char > storage, StringSpan &output)
 Percent-decodes a URI component into caller-provided storage.
 
SC_HTTP_EXPORT Result SC::HttpFormUrlDecode (StringSpan input, Span< char > storage, StringSpan &output)
 Decodes an application/x-www-form-urlencoded component into caller-provided storage.
 

Detailed Description

Enumeration Type Documentation

◆ HttpWebSocketEndpointRole

enum class SC::HttpWebSocketEndpointRole : uint8_t
strong

#include <HttpWebSocket.h>

Identifies the local endpoint role to validate masking rules.

◆ HttpWebSocketOpcode

enum class SC::HttpWebSocketOpcode : uint8_t
strong

#include <HttpWebSocket.h>

WebSocket frame opcode as defined by RFC 6455.

Function Documentation

◆ HttpContentTypeTextPlainUtf8()

SC_HTTP_EXPORT StringSpan SC::HttpContentTypeTextPlainUtf8 ( )

#include <HttpHeaders.h>

Common Content-Type header values.

◆ HttpFormUrlDecode()

SC_HTTP_EXPORT Result SC::HttpFormUrlDecode ( StringSpan input,
Span< char > storage,
StringSpan & output )

#include <HttpURLParser.h>

Decodes an application/x-www-form-urlencoded component into caller-provided storage.

◆ HttpMultipartIsSafeFileName()

SC_HTTP_EXPORT bool SC::HttpMultipartIsSafeFileName ( StringSpan fileName)

#include <HttpMultipartParser.h>

Conservative multipart filename safety check for upload sinks.

◆ HttpParseBasicCredentials()

SC_HTTP_EXPORT Result SC::HttpParseBasicCredentials ( StringSpan authorizationHeader,
Span< char > storage,
StringSpan & username,
StringSpan & password )

#include <HttpHeaders.h>

Parses Basic Authorization credentials into caller-provided decoded storage.

◆ HttpParseBearerToken()

SC_HTTP_EXPORT Result SC::HttpParseBearerToken ( StringSpan authorizationHeader,
StringSpan & token )

#include <HttpHeaders.h>

Parses a Bearer Authorization header and returns the raw token slice.

◆ HttpPercentDecode()

SC_HTTP_EXPORT Result SC::HttpPercentDecode ( StringSpan input,
Span< char > storage,
StringSpan & output )

#include <HttpURLParser.h>

Percent-decodes a URI component into caller-provided storage.

◆ HttpWriteBasicAuthorization()

SC_HTTP_EXPORT Result SC::HttpWriteBasicAuthorization ( StringSpan base64Credentials,
Span< char > storage,
StringSpan & output )

#include <HttpHeaders.h>

Writes Basic <base64Credentials> into caller-provided storage.

◆ HttpWriteBasicAuthorizationCredentials()

SC_HTTP_EXPORT Result SC::HttpWriteBasicAuthorizationCredentials ( StringSpan username,
StringSpan password,
Span< char > storage,
StringSpan & output )

#include <HttpHeaders.h>

Writes Basic <base64(username:password)> into caller-provided storage.

◆ HttpWriteBearerAuthorization()

SC_HTTP_EXPORT Result SC::HttpWriteBearerAuthorization ( StringSpan token,
Span< char > storage,
StringSpan & output )

#include <HttpHeaders.h>

Writes Bearer <token> into caller-provided storage.