Skip to content

Conversation

@WaffleSoul4
Copy link
Contributor

Switch to using the ureq 3 API. The changes include:

  • Parsing supported http methods
  • Use newer configuration API
  • Substitute the status part of the header with the canonical reason for the response code

@WaffleSoul4
Copy link
Contributor Author

You could also consider swapping the Method enum in the example for the newly included one in ehttp

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Looking good - thanks!

break;
}
},
);
Copy link
Owner

Choose a reason for hiding this comment

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

There is a lot of code in common here with ehttp/src/native.rs. Maybe the setup-code could be broken out into a helper function that is used by both places?

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Actually, HEAD requests are broken in the demo app (cargo run)

Image

WaffleSoul4 and others added 4 commits January 6, 2026 09:58
chore: clarify the reason for used of `unreachable!()`

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
Rather than the simple `std::io::Error::UnexpectedEof`, ureq now uses `std::io::Error::Custom(ureq::Error::Decompress(&str, std::io::Error::UnexpectedEof))`
@WaffleSoul4
Copy link
Contributor Author

HEAD requests have been fixed. I'm quite surprised that a subtle change (see commit description) to how ureq gives errors wouldn't be listed in the migration guide.

@emilk emilk merged commit 5bb820f into emilk:main Jan 6, 2026
7 of 8 checks passed
@emilk
Copy link
Owner

emilk commented Jan 6, 2026

Thanks!

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