Skip to content

Instantly share code, notes, and snippets.

View rauniyar01's full-sized avatar
🎯
Focusing

Ashish Rauniyar rauniyar01

🎯
Focusing
View GitHub Profile
@rauniyar01
rauniyar01 / RequestManager.cs
Created March 15, 2021 13:11 — forked from olafurjohannsson/RequestManager.cs
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)
{
import hashlib as hasher
import datetime as date
# Define what a Snakecoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash