Slide 4
Slide 4 text
http.RoundTripperの役割
(c *Client) Do(req *Request)
send(ireq *Request, rt RoundTripper, deadline time.Time)
net/http/client.go
(t *Transport) RoundTrip(req *Request)
net/http/roundtrip.go
(t *Transport) roundTrip(req *Request)
net/http/transport.go
(t *Transport) dialConn(ctx context.Context, cm connectMethod)
type RoundTripper interface {
RoundTrip(*Request) (*Response, error)
}
http.clientの通信は実質RoundTripperが担う