4#include "../Foundation/Result.h"
5#include "../Foundation/Span.h"
6#include "../Foundation/StringSpan.h"
19 bool hasValue =
false;
59 bool hasMaxAge =
false;
61 bool httpOnly =
false;
78 bool httpOnly =
false;
85SC_HTTP_EXPORT
StringSpan HttpContentTypeTextHtmlUtf8();
86SC_HTTP_EXPORT
StringSpan HttpContentTypeApplicationJson();
87SC_HTTP_EXPORT
StringSpan HttpContentTypeApplicationOctetStream();
94 bool hasMaxAge =
false;
97 bool publicCache =
false;
98 bool privateCache =
false;
99 bool mustRevalidate =
false;
100 bool immutable =
false;
112 bool isBearer()
const;
113 bool isBasic()
const;
unsigned int uint32_t
Platform independent (4) bytes unsigned int.
Definition PrimitiveTypes.h:29
SC_HTTP_EXPORT StringSpan HttpContentTypeTextPlainUtf8()
Common Content-Type header values.
SC_HTTP_EXPORT Result HttpParseBasicCredentials(StringSpan authorizationHeader, Span< char > storage, StringSpan &username, StringSpan &password)
Parses Basic Authorization credentials into caller-provided decoded storage.
SC_HTTP_EXPORT Result HttpWriteBasicAuthorization(StringSpan base64Credentials, Span< char > storage, StringSpan &output)
Writes Basic <base64Credentials> into caller-provided storage.
SC_HTTP_EXPORT Result HttpParseBearerToken(StringSpan authorizationHeader, StringSpan &token)
Parses a Bearer Authorization header and returns the raw token slice.
SC_HTTP_EXPORT Result HttpWriteBearerAuthorization(StringSpan token, Span< char > storage, StringSpan &output)
Writes Bearer <token> into caller-provided storage.
Zero-copy view of an Authorization header split into scheme and credentials.
Definition HttpHeaders.h:107
Writes a Cache-Control header value into caller-provided storage.
Definition HttpHeaders.h:91
Iterates a request Cookie header as semicolon-delimited name/value pairs.
Definition HttpHeaders.h:24
Iterates semicolon-delimited Set-Cookie attributes after the first name/value pair.
Definition HttpHeaders.h:36
Writes a Set-Cookie header value into caller-provided storage.
Definition HttpHeaders.h:68
Zero-copy view of one Set-Cookie header value.
Definition HttpHeaders.h:48
An ascii string used as boolean result. SC_TRY macro forwards errors to caller.
Definition Result.h:13
View over a contiguous sequence of items (pointer + size in elements).
Definition Span.h:29
An read-only view over a string (to avoid including Strings library when parsing is not needed).
Definition StringSpan.h:37