nclient / NClient

:dizzy: NClient is an automatic type-safe .Net HTTP client that allows you to call web service API methods using annotated interfaces or controllers without boilerplate code.
Apache License 2.0
43 stars 11 forks source link

Selecting the scope for the client in DI #449

Closed smolchanovsky closed 1 year ago

smolchanovsky commented 2 years ago

Now clients are created as singletons. This does not allow using non-singleton instance classes to create it.

Kingmidas74 commented 1 year ago

Do you want additional method like AddRestNClientTransient, AddRestNClientSingleton, etc.. or additional option for current methods?

smolchanovsky commented 1 year ago

Ideally, we need both, but perhaps there are enough AddRestNClientTransient, AddRestNClientSingleton and AddRestNClientScoped methods for the first time.

Kingmidas74 commented 1 year ago

Well... I've done both.