Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify Http.send to that it returns a Result #309

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Conversation

lukewilliamboswell
Copy link
Collaborator

zulip discusison

The API previously provided similar behaviour, which was enabled by the higher level reqwest crate. That was removed in #288, however we still want to keep a similar API. This PR returns the error by matching on the returned hardcoded RocStr to identify those errors returned from the host.

New API

send! : Request => Result Response [HttpErr [Timeout, NetworkError, BadBody, Other (List U8)]]

@lukewilliamboswell lukewilliamboswell changed the base branch from main to snake_case_builtins January 9, 2025 22:24
Base automatically changed from snake_case_builtins to main January 10, 2025 11:02
Copy link
Collaborator

@Anton-4 Anton-4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Anton-4 Anton-4 merged commit 49701fc into main Jan 10, 2025
3 checks passed
@Anton-4 Anton-4 deleted the http-send-result branch January 10, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants