Exemplo n.º 1
0
        public IRestResponse Batch(string listUrl, ListItems items, string action)
        {
            var body = items.Serialize();

            var client  = new RestClient(listUrl);
            var request = new RestRequest("batch", Method.POST);

            request.AddQueryParameter("type", action);
            request.AddHeader("Accept", "application/xml");
            request.AddHeader("Authorization", "OAuth " + this.accessToken.Token);
            request.AddParameter("application/xml", body, ParameterType.RequestBody);

            return(client.Execute(request));
        }