And have been trying to understand when to use RoundTrip and when to use Client.Do.
I am running the following code in my local machine:
http://play.golang.org/p/x6E0T1Hyfz
client, transport := NewClient()
transport.RoundTrip(req)
301 Moved Permanently
RoundTrip took: 51.102069ms
200 OK
Client took: 129.125018ms
1. RoundTrip takes less time to finish.
2. What do we mean by `RoundTrip should not attempt to interpret the response.`?
Then when do we use RoundTripper?
3. Why does RoundTrip return 301 instead of 200?
Guess I am just confused about RoundTripper in general.
Thanks in advance.