ruckus / quickbooks-ruby

Quickbooks Online REST API V3 - Ruby
MIT License
374 stars 302 forks source link

Allow Faraday adapter used in quickbooks-ruby to be configurable #550

Closed danielnho22 closed 3 years ago

danielnho22 commented 3 years ago

Currently, NetHttp is used by default for Faraday. If quickbooks-ruby wants to be used in a thread-safe context, we should replace the net-http adapter with something like net-http-persistent.

This allows that to be done by setting Quickbooks.http_adapter

ruckus commented 3 years ago

@danielnho22 Good call. Any reason why this shouldn't just be made the default?

danielnho22 commented 3 years ago

@ruckus That's a good question. I can't find any info of why net-http-persistent isn't just the default in Faraday. If we're cool with it, I can make it the default for quickbooks-ruby.

danielnho22 commented 3 years ago

@ruckus The default is now net-http-persistent

danielnho22 commented 3 years ago

I imagine that most people using this gem are consistently making requests to the same servers and re-using connections to them in a thread-safe context would be preferable.

ruckus commented 3 years ago

@danielnho22 thanks!!!