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

Method copyStateString

Libraries/HttpClient/HttpClientSession.cpp:613–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

611}
612
613static bool sessionIsIdempotentMethod(SC::HttpClientRequest::Method method)
614{
615 switch (method)
616 {
617 case SC::HttpClientRequest::HttpGET:
618 case SC::HttpClientRequest::HttpHEAD:
619 case SC::HttpClientRequest::HttpPUT:
620 case SC::HttpClientRequest::HttpDELETE:
621 case SC::HttpClientRequest::HttpOPTIONS: return true;
622 case SC::HttpClientRequest::HttpPOST:
623 case SC::HttpClientRequest::HttpPATCH: return false;
624 }
625 return false;
626}
627
628static bool sessionIsRetryableStatusCode(int statusCode)
629{
630 return statusCode == 408 or statusCode == 425 or statusCode == 429 or statusCode == 500 or statusCode == 502 or
631 statusCode == 503 or statusCode == 504;
632}
633
634static bool canReplayRequestBody(const SC::HttpClientRequestBody& body)

Callers

nothing calls this directly

Calls 5

StringSpanFunction · 0.85
ResultClass · 0.50
sizeInBytesMethod · 0.45
isEmptyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected