예제 #1
0
        [U] public override async Task Urls()
        {
            await UrlTester.GET("/_security/role_mapping")
            .Fluent(c => c.Security.GetRoleMapping())
            .Request(c => c.Security.GetRoleMapping(new GetRoleMappingRequest()))
            .FluentAsync(c => c.Security.GetRoleMappingAsync())
            .RequestAsync(c => c.Security.GetRoleMappingAsync(new GetRoleMappingRequest()))
            ;

            var roles = "can_write,can_read_metadata";
            await UrlTester.GET($"/_security/role_mapping/{UrlTester.EscapeUriString(roles)}")
            .Fluent(c => c.Security.GetRoleMapping(roles))
            .Request(c => c.Security.GetRoleMapping(new GetRoleMappingRequest(roles)))
            .FluentAsync(c => c.Security.GetRoleMappingAsync(roles))
            .RequestAsync(c => c.Security.GetRoleMappingAsync(new GetRoleMappingRequest(roles)))
            ;
        }
예제 #2
0
 [U] public override async Task Urls() =>
 await UrlTester.POST($"/_update_by_query/{UrlTester.EscapeUriString(_taskId.ToString())}/_rethrottle")
 .Fluent(c => c.UpdateByQueryRethrottle(_taskId))
 .Request(c => c.UpdateByQueryRethrottle(new UpdateByQueryRethrottleRequest(_taskId)))
 .FluentAsync(c => c.UpdateByQueryRethrottleAsync(_taskId))
 .RequestAsync(c => c.UpdateByQueryRethrottleAsync(new UpdateByQueryRethrottleRequest(_taskId)));