I haven’t written anything like that, I’m merely offering a suggestion on why the docs say not to do it.
On 7 Mar 2018, at 09:28, eyal <[email protected]<mailto:[email protected]>> wrote: In your tests in the round-trippers you do change the requests, as far as i can see. On Wed, Mar 7, 2018 at 10:13 AM Jakob Borg <[email protected]<mailto:[email protected]>> wrote: On 7 Mar 2018, at 08:07, Eyal Posener <[email protected]<mailto:[email protected]>> wrote: > > Very Nice stuff - shame he didn't merge it. > But I see that you changes the request in the RoundTrip function, which is > claimed as forbidden in the docs. > Again, I don't understand why the docs forbid it… I expect that this is so that the user of the HTTP client API can reasonably reuse a *http.Request. If the RoundTripper where allowed to change it then it might have different URL, headers, method etc when the request is completed and you’d have to recreate it again from scratch. //jb -- sent from the milky way -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
