Skip to content

Instantly share code, notes, and snippets.

@olafurjohannsson
olafurjohannsson / RequestManager.cs
Last active December 15, 2021 13:34
C# asynchronous HTTP GET and POST method wrapped nicely in a RequestManager class - it memory caches it's requests via the Cache class
/// <summary>
/// Reqeust manager encapsulates asynchronous HTTP GET and POST methods
/// In conjunction with that, it internally caches requests made in the same minute
/// </summary>
public class RequestManager
{
private Dictionary<string, string> CustomHeaders = null;
public RequestManager(Dictionary<string, string> customHeaders = null)
{