gorequest
gorequest copied to clipboard
How to reuse session.
Everytime when I do a post request, it creates new TCP connection. Looking at netstat this appears to be resulting in a new connection for every post, and it results to a large number of concurrent connections being open.
After that I tried s.Transport.DisableKeepAlives = false
, it works for sequential POST request but not in goroutine.
What is the correct way to reuse connections in this case?