parsec-cloud icon indicating copy to clipboard operation
parsec-cloud copied to clipboard

Implement a client factory for `client-connection`

Open FirelightFlagboy opened this issue 3 years ago • 0 comments

You're right, we'd better have a client factory function (this would have the added benefit of allowing us to easily mock the client object for the tests)

Concerning the client configuration what I currently see:

  1. user agent should be set to the literal parsec/{version}
  2. it should be possible to provide custom tls certificates
  3. it should also be possible provide custom proxy configuration (especially given I guess reqwest doesn't handle PAC proxy scripts so we will have to handle it by hand)

For the moment 2) and 3) are too advanced so better just ignore them, so we only have 1) that is very easy to set using ClientBuilder directly. So I guess we don't need a client factory for the moment ;-)

Originally posted by @touilleMan in https://github.com/Scille/parsec-cloud/pull/2460#discussion_r905901332

require #2460

FirelightFlagboy avatar Jun 24 '22 10:06 FirelightFlagboy