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

Method beginRetry

Libraries/HttpClient/HttpClientSession.cpp:1029–1040  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027}
1028
1029SC::Result SC::HttpClientSession::beginRetry(HttpClientSessionRetryState& state, const HttpClientRequest& request,
1030 HttpClientSessionRetryPolicy policy) const
1031{
1032 SC_TRY_MSG(initialized, "HttpClientSession: not initialized");
1033 SC_TRY_MSG(policy.maxAttempts > 0, "HttpClientSession: retry policy has no attempts");
1034
1035 state.method = request.method;
1036 state.policy = policy;
1037 state.attemptsStarted = 1;
1038 state.requestBodyReplayable = canReplayRequestBody(request.body);
1039 return Result(true);
1040}
1041
1042bool SC::HttpClientSession::shouldRetry(HttpClientSessionRetryState& state, Result transportResult,
1043 const HttpClientResponse* response) const

Callers 1

sessionLayerMethod · 0.80

Calls 2

canReplayRequestBodyFunction · 0.85
ResultClass · 0.50

Tested by 1

sessionLayerMethod · 0.64