Beispiel #1
0
            public override HttpRequestMessage CreateRequest(JsonOperationContext ctx, ServerNode node, out string url)
            {
                url = $"{node.Url}/databases/{_databaseName}/admin/tasks/external-replication";

                var request = new HttpRequestMessage
                {
                    Method  = HttpMethod.Post,
                    Content = new BlittableJsonContent(stream =>
                    {
                        var json = new DynamicJsonValue
                        {
                            ["Watcher"] = _newWatcher.ToJson()
                        };

                        ctx.Write(stream, ctx.ReadObject(json, "update-replication"));
                    })
                };

                return(request);
            }
 public override void FillJson(DynamicJsonValue json)
 {
     json[nameof(Watcher)] = Watcher.ToJson();
 }