We are migrating our C# code from 2011 endpoint to Web API. We have API version 8.0. We have successfully implemented the Insert/Delete/Update operations using Web API but for bulk operations we are not getting how to implement this in C#. We referred https://gist.github.com/prabirshrestha/3929230 for implementations. Here the code that we wrote:
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "batch");
MultipartContent batchContent = new MultipartContent("batch");
request.Content = batchContent;
batchContent.Add(new HttpMessageContent(new
HttpRequestMessage(HttpMethod.Get, "contacts")));
response = httpClient.SendAsync(request);
response.Wait();
With this code we are getting error like saying:
This operation is not supported for a relative URI.
Please let us know if anybody can help us to implement this. Also have question, like is bulk operations are part of Web API 8.0 version or there are introduced after this version?