public async Task Test1() { var client = MyClientInitiator.NewClient(e => e .WithBaseUrl("http://localhost:9000") .WithAnonymousAuth ); var request = client.MakeRequest(e => e .GetProjects .WithQualifiers(new[] { ComponentsQualifiers.Trk }) ); var res = await request.Execute(); _testOutputHelper.WriteLine(res.ToString()); }
public static IServiceCollection ConfigureMyClient( this IServiceCollection serviceCollection, Func <MyClientBaseUrlBuilder, AuthType> clientBuilder) => serviceCollection.AddSingleton(_ => MyClientInitiator.NewClient(clientBuilder));