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

async/request: add methods to split and reassemble a RequestBuilder #1770

Merged

Conversation

lucab
Copy link
Contributor

@lucab lucab commented Mar 9, 2023

This adds two methods to split and reassemble a RequestBuilder. It allows consumers to temporarily reach into the inner Request and later reconstruct the original builder.

Closes: #1212

This adds two methods to split and reassemble a `RequestBuilder`.
It allows consumers to temporarily reach into the inner `Request`
and later reconstruct the original builder.
@seanmonstar seanmonstar merged commit 119366e into seanmonstar:master Mar 9, 2023
30 checks passed
@lucab lucab deleted the ups/request-builder-split-reassemble branch March 10, 2023 08:06
lucab added a commit to denoland/deno that referenced this pull request Mar 13, 2023
This tweaks the signature of `request_builder_hook` in order to support
fallible hooks.

The rationale for this is mostly on two sides:
* it allows a hook to inspect and possibly drop an outgoing request
(e.g. for policying purposes), bubbling up a detailed error message to
the user.
* it wires into newer `reqwest` API which allows to split and then
reassemble a `RequestBuilder`, although only in a fallible way
(seanmonstar/reqwest#1770)
kt3k pushed a commit to denoland/deno that referenced this pull request Mar 16, 2023
This tweaks the signature of `request_builder_hook` in order to support
fallible hooks.

The rationale for this is mostly on two sides:
* it allows a hook to inspect and possibly drop an outgoing request
(e.g. for policying purposes), bubbling up a detailed error message to
the user.
* it wires into newer `reqwest` API which allows to split and then
reassemble a `RequestBuilder`, although only in a fallible way
(seanmonstar/reqwest#1770)
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.

Access to Request from RequestBuilder
2 participants