Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am using HttpClient to send GET and POST requests. According to this article you should not create a new instance of the HttpClient before each call but rather reuse one instance through out the lifetime of the application.
So instead of:
var client = new HttpClient()
var response = client.GetAsync(url);
I would like to use a global instance of client.
How can you create such reusable instances in Umbraco?
Where can I put the code so it is created at start and survives as long as the application is running?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted