gorequest
gorequest copied to clipboard
Concurrent Requests.
How does this library handle concurrency?
Like multiple simultaneous requests?
Is there an example?
Looks like fun.
Thanks.
As long as you create a new gorequest object, concurrency will be fine. But that is pretty inefficient, The Request object internally holds http.Client. As per the godoc a single client is enough to handle concurrent requests.
@whitebook I encountered fatal error: concurrent map writes when using single gorequest object for all my POST requests. As you see from error (and what I can see on the line indicated by error dump) it is caused by setting headers using Set(string, string).
It would be great if it would be handled internally by gorequest but then again I don't see a big issue having a dedicated goroutine for gorequest(s).
+1 for handling concurrent requests through GoRequest
+1 for handling concurrent requests through GoRequest
Is this project still maintained? If so, is anyone still interested in this feature? Just asking for hacktoberfest, I'd gladly take this one.
As a http client library , i think this feature is necessary
Any word on this? I'm getting the same crash while making concurrent requests.