-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathProgram.cs
More file actions
31 lines (25 loc) · 855 Bytes
/
Copy pathProgram.cs
File metadata and controls
31 lines (25 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Fluxzy;
using Fluxzy.Rules.Actions.HighLevelActions;
namespace Samples.No011.AddRequestCookie
{
internal class Program
{
/// <summary>
/// Add request cookie on any ongoing requests
/// </summary>
/// <param name="args"></param>
/// <returns></returns>
static async Task Main(string[] args)
{
var fluxzySetting = FluxzySetting.CreateDefault();
fluxzySetting.ConfigureRule()
// Add request cookie on any ongoing request
.WhenAny()
.Do(new SetRequestCookieAction("fluxzy-cookie", "yes"));
await using var proxy = new Proxy(fluxzySetting);
proxy.Run();
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}
}