Skip to content

Is there any synchronous (non-async) http mock for ureq testing? #873

Closed Answered by algesten
asv7c2 asked this question in Q&A
Discussion options

You must be logged in to vote

For ureq 2.x, it's a bit limited, but you got this constructor: https://docs.rs/ureq/2.10.1/ureq/struct.Response.html#method.new

For ureq 3.x the API is the http crate, and the body can be created any way you want: https://docs.rs/ureq/3.0.0-rc2/ureq/struct.Body.html#method.builder

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by asv7c2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants