| 611 | } |
| 612 | |
| 613 | static 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 | |
| 628 | static 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 | |
| 634 | static bool canReplayRequestBody(const SC::HttpClientRequestBody& body) |
nothing calls this directly
no test coverage detected