MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / appendScratch

Method appendScratch

Libraries/HttpClient/HttpClientSession.cpp:642–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

640{
641 if (index < username.sizeInBytes())
642 {
643 return username[index];
644 }
645 if (index == username.sizeInBytes())
646 {
647 return ':';
648 }
649 return password[index - username.sizeInBytes() - 1];
650}
651} // namespace
652
653SC::Result SC::HttpClientSession::init(const HttpClientSessionMemory& memory)
654{
655 SC_TRY_MSG(not initialized, "HttpClientSession: already initialized");
656 SC_TRY_MSG(not memory.requestHeaders.empty(), "HttpClientSession: request header workspace missing");
657 sessionMemory = memory;
658 clear();
659 initialized = true;
660 return Result(true);
661}
662

Callers

nothing calls this directly

Calls 3

ResultClass · 0.50
sizeInBytesMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected