Skip to content
This repository was archived by the owner on Apr 10, 2018. It is now read-only.
This repository was archived by the owner on Apr 10, 2018. It is now read-only.

Creating and disposing http clients on each request? #11

@ashic

Description

@ashic

Is seems the RestClient class is creating and disposing http clients for each request. This seems to be a bad practice: http://stackoverflow.com/questions/18976042/httpclientfactory-create-vs-new-httpclient . When integrating with other clients that expect long lived instances, this is causing us some problems. Is this by design? Is there a workaround? Maintaining a singleton in a custom factory doesn't work either as clients are expected to get created with a request message:

var httpClient = HttpClientFactory.CreateClient(this, request)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions