Client

    1. var client = DaprClient.CreateInvokeHttpClient(appId: "routing");
    2. var deposit = new Transaction { Id = "17", Amount = 99m };
    3. var response = await client.PostAsJsonAsync("/deposit", deposit, cancellationToken);
    4. Console.WriteLine("Returned: id:{0} | Balance:{1}", account.Id, account.Balance);
    • For a full list of state operations visit .
    1. var client = new DaprClientBuilder().Build();
    2. var eventData = new { Id = "17", Amount = 10m, };
    3. await client.PublishEventAsync(pubsubName, "deposit", eventData, cancellationToken);
    1. var client = new DaprClientBuilder().Build();
    2. // Retrieve a key-value-pair-based secret - returns a Dictionary<string, string>
    3. var secrets = await client.GetSecretAsync("mysecretstore", "key-value-pair-secret");
    4. Console.WriteLine($"Got secret keys: {string.Join(", ", secrets.Keys)}");
    • For a full guide on secrets visit .