drbrain/net-http-persistent

Need of name parameter

justinvj15 opened this issue · 1 comments

what is the use of name option passed to Net::HTTP::Persistent.new. so if i write a common method to send api calls to different services, requests to the same service to be grouped by a unique name value?. is there any problem if i don't pass the name option at all?.

Thanks

If you are using another gem that uses net-http-persistent, the name parameter allows you to explicitly close the connections you are using while leaving the other library's connections alone.

There is no need to set the name parameter. If you do not set it and close the connections in your library it will not harm the other library. If you frequently close connections in your library it may reduce performance, though.