You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, WDYT about implementing Future for RequestBuilder directly?
The future would, when awaited, consume the RequestBuilder and send the request, just what .send() would do. This would shorten common patterns like client.get("http://example.com").send().await to client.get("http://example.com").await. Even though .send() is only 7 characters, it kind of bothers me to have to type it every time, when an .await would already suffice.
The text was updated successfully, but these errors were encountered:
I have wanted something like this, but I don't think having the builders implement Future directly is the best option. I tried adding IntoFuture to the standard library, it's stalled due to compiler regressions:
Hey, WDYT about implementing Future for RequestBuilder directly?
The future would, when
await
ed, consume the RequestBuilder and send the request, just what.send()
would do. This would shorten common patterns likeclient.get("http://example.com").send().await
toclient.get("http://example.com").await
. Even though.send()
is only 7 characters, it kind of bothers me to have to type it every time, when an.await
would already suffice.The text was updated successfully, but these errors were encountered: