There is no supported way to deep copy a general request object. Instead I would suggest copying the headers/body directly and replaying the request through the router as part of your simulations.
On Tue, Jan 15, 2019 at 4:09 AM Thierry Florac <tflo...@gmail.com> wrote: > Hi, > Simple question: I have a use case where I need to create an exact copy (a > clone) of a request, to update it's properties and make "simulations" > (actually by providing custom marker interfaces) without modifying the > original request. > Is there a good way to do this? > Actually I just tried to do a "request.copy()", but then I get errors like > "AttributeError: 'Request' object has no attribute 'root'" when trying to > get access to "root" attribute... > > Thanks for any help, > Thierry > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pylons-discuss+unsubscr...@googlegroups.com. > To post to this group, send email to pylons-discuss@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pylons-discuss/CAPX_VWAWwAbA6MAWHP_2C-3PxfKiXktt1mecJHp5aokeZVOwdA%40mail.gmail.com > <https://groups.google.com/d/msgid/pylons-discuss/CAPX_VWAWwAbA6MAWHP_2C-3PxfKiXktt1mecJHp5aokeZVOwdA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To post to this group, send email to pylons-discuss@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAKdhhwGYRyAg5B0Yv700s9%3D8%3DJ31E_%3Dsquqm4w1_Kw35Nq6QUQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.