Replies: 1 comment
-
@seanmonstar do you have any thoughts on this? Am I the first person to bring this up? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my own use case, I currently find myself doing some variant of this a lot:
Has there been any discussion of returning a
Result<impl Future<Output = serde_json::Value>, reqwest::Error>
where theOk
consumes the.json()
and theErr
consumes the.body()
? Am I missing something blindingly obvious here? Are there 3rd-party crates above reqwest that handle this?I do recognize that with the async client,
.send().await
must precede the.json().await
/.text().await
because the status code is available in the response bytes coming across the wire before the remainder of the response is.Beta Was this translation helpful? Give feedback.
All reactions