Replies: 1 comment 4 replies
-
By Re extensions: Request bodies are often streams which cannot be cloned either. I agree that having cloneable requests would be nice, but there are lots of challenges to make it. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm writing a small HTTP proxy, which gets a request, adds some headers and executes it. If the request fails, it adds different headers and retries.
Since sending the request consumes it, I'd like to
copy()
it in order to be able to send it the second time. This turns out to be surprisingly painful:Copy
traitParts
are notCopy
as wellParts
myself, since they have a private field and are notDefault
Parts
fields areCopy
, except forextensions
, which isOption<Box<HashMap<_,_>>>
so it can be madeCopy
, but isn'tIs there a reason to forbid such a use case, or am I the only one who stumbled upon it?
Beta Was this translation helpful? Give feedback.
All reactions