go - Are "http.Transport" and "http.Client" safe for concurrent modification in Go?

174 Views Asked by At

According to http.Client and http.Transport documentation in Go's built-in net/http package:

// The Client's Transport typically has internal state (cached TCP
// connections), so Clients should be reused instead of created as
// needed. Clients are safe for concurrent use by multiple goroutines.

So I just wonder: is it safe for concurrent modification too or not? since I wanna perform 20K http.Request with single http.Client struct and different values concurrently, not consecutively.

0

There are 0 best solutions below