[x] π I created my PR using provided : CODE_STANDARDS
[x] π I have read the short Code of Conduct: CODE_OF_CONDUCT
[x] π I tested my changes locally.
[x] β I have provided tests for my changes.
[x] π I have used conventional commits.
[ ] π I have updated any related documentation.
[x] πΎ PR was issued based on the Github or Jira issue.
While doing this task, I discovered that, every time a request to our Pulse service is made, a new http.Client is created. I've change it - so that now, only one http.Client is created during the initialization stage.
From golang documentation:
A Client is an HTTP client. Its zero value (DefaultClient) is a usable client that uses DefaultTransport.
The Client's Transport typically has internal state (cached TCP connections), so Clients should be reused instead of created as needed. Clients are safe for concurrent use by multiple goroutines.
Pull Request Checklist
While doing this task, I discovered that, every time a request to our Pulse service is made, a new
http.Client
is created. I've change it - so that now, only one http.Client is created during the initialization stage.From golang documentation: