feat: add support for making HTTP requests#4
feat: add support for making HTTP requests#4jjhafer wants to merge 4 commits intosilvermine:masterfrom
Conversation
afc9918 to
25e3f31
Compare
25e3f31 to
f1dce9d
Compare
|
@onebytegone I'll ask @velocitysystems to do a review, but if you want to look at the API or tests to get a feel for how we'll use it, please feel free. |
src/client.rs
Outdated
| // (max_attempts >= 1, so attempt 0 always executes and sets last_result). | ||
| match last_result.unwrap() { | ||
| Ok(mut resp) => { | ||
| resp.retry_count = max_attempts - 1; |
There was a problem hiding this comment.
The code after this for loop appears to be unreachable: on the final iteration (attempt + 1 == max_attempts), should_retry is false, so the match always falls through to the _ => arm which returns directly. That means last_result.unwrap() can never actually execute.
Would it be worth restructuring the loop to make the control flow explicit — e.g., a loop { ... break } that eliminates the Option wrapper entirely? That would remove the misleading "Safety" comment and make it clear to future readers that every path returns from inside the loop.
Comment added by AI model claude-opus-4-6
There was a problem hiding this comment.
Good idea, updated. What do you think of the change?
Includes the following features: * A dynamic 'allowlist' which can be configured at initialization and during an app session. * Retry support. See README for more information.
f1dce9d to
48b21b0
Compare
Includes the following features:
A dynamic 'allowlist' which can be configured at initialization and during an app session.
Retry support.
See README for more information.