You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you try to create multiple item in one Create (batch) it throws the following exception:
System.ArgumentException : Invalid 'HttpContent' instance provided. It does not have a content type header starting with 'multipart/'.
Parameter name: content
I downloaded and tried to ran the built in tests and it also failed (BasicCRUDTests.TestMethod1) with the same.
I set up CRMWebAPI with the following code (for test): CRMWebAPI api = new CRMWebAPI("https://crm/D365DEV/api/data/v9.0/", new NetworkCredential("username", "pass", "domain"));
And run the following: List<object> batchList = new List<object>(); for (int i = 0; i < 5; i++) { dynamic batchCreateData = new ExpandoObject(); batchCreateData.name = "test " + DateTime.Now.ToString(); batchList.Add(batchCreateData); } Results.CRMBatchResult batchResults = await api.Create("accounts", batchList.ToArray());
I saw the code and this method created its own HttpClient which do not take care of on-prem scenario.
Is there any chance to fix it? (or maybe I can create a PR, but I saw that the code didn't change a while...)
The text was updated successfully, but these errors were encountered:
When you try to create multiple item in one Create (batch) it throws the following exception:
I downloaded and tried to ran the built in tests and it also failed (BasicCRUDTests.TestMethod1) with the same.
I set up CRMWebAPI with the following code (for test):
CRMWebAPI api = new CRMWebAPI("https://crm/D365DEV/api/data/v9.0/", new NetworkCredential("username", "pass", "domain"));
And run the following:
List<object> batchList = new List<object>(); for (int i = 0; i < 5; i++) { dynamic batchCreateData = new ExpandoObject(); batchCreateData.name = "test " + DateTime.Now.ToString(); batchList.Add(batchCreateData); } Results.CRMBatchResult batchResults = await api.Create("accounts", batchList.ToArray());
I saw the code and this method created its own HttpClient which do not take care of on-prem scenario.
Is there any chance to fix it? (or maybe I can create a PR, but I saw that the code didn't change a while...)
The text was updated successfully, but these errors were encountered: