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

Use the attohttpc crate instead of ureq #7

Merged
merged 2 commits into from Sep 1, 2021

Conversation

InputUsername
Copy link
Owner

@InputUsername InputUsername commented Sep 1, 2021

This has some implications for Error:

  • because attohttpc doesn't distinguish between errors
    when serializing or deserializing request/response
    data, Error::RequestJson and Error::ResponseJson have
    been merged into Error::Json. In practice this shouldn't
    matter much because request data is (usually) well-formed.
  • attohttpc also doesn't return errors for HTTP responses
    with statuses in the [400-599] range, so manual conversion
    to an error is needed (this now happens in ResponseType::from_response).

Closes #3.

This has some implications for Error:
- because attohttpc doesn't distinguish between errors
  when serializing or deserializing request/response
  data, Error::RequestJson and Error::ResponseJson have
  been merged into Error::Json. In practice this shouldn't
  matter much because request data is (usually) well-formed.
- attohttpc also doesn't return errors for HTTP responses
  with statuses in the [400-599] range, so manual conversion
  to an error is needed (this now happens in ResponseType::from_response).
@InputUsername InputUsername added this to the v0.4.0 milestone Sep 1, 2021
Copy link
Collaborator

@shymega shymega left a comment

Choose a reason for hiding this comment

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

Looks excellent! I'm happy for this to be merged.

@InputUsername InputUsername merged commit 1e611f1 into main Sep 1, 2021
@InputUsername InputUsername deleted the feature/use-attohttpc branch September 1, 2021 22:14
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.

Replace ureq with attohttpc
2 participants