HttpHeaderInit
Description
Initialize an empty HttpHeader. Inside a Scope the allocator argument may be omitted (uses MisraScope).
Success
Returns an HttpHeader whose key and value are empty Strs backed by the resolved allocator.
Failure
Macro cannot fail (pure literal expansion).
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Http.c:159:
}
HttpHeader hh = HttpHeaderInit(alloc);
StrReadFmt(cursor, "{}: {}\r\n", hh.key, hh.value);
if (cursor == line_start) {- In
Http.Leak.c:43:
HttpHeaders headers = VecInitWithDeepCopy(http_header_init_copy, http_header_deinit, adbg);
HttpHeader hh = HttpHeaderInit(adbg);
StrAppendFmt(&hh.key, "X-A-Reasonably-Long-Header-Key-Name");
StrAppendFmt(&hh.value, "a-reasonably-long-header-value-string");
Last updated on