OData / ODataSamples

Samples: For ODataLib, OData Web API, RESTier, etc.
http://odata.github.io/
Other
293 stars 222 forks source link

No response on BatchHandler with multiples requests #143

Open WSMaxx opened 3 years ago

WSMaxx commented 3 years ago

Dear all,

Hope you are fine.

We have an issue with BatchHandler when we try to send multiples requests in TrippinMemory Web api like.

We have this service in WebConfig:

                ODataBatchHandler myappsBatchHandler = new MyAppsBatchHandler(GlobalConfiguration.DefaultServer);
                myappsBatchHandler.ODataRouteName = routeName;
                services.AddSingleton(myappsBatchHandler);

BatchHandler is the same as trippin memory sample.

If we update one value in the batch, no problem (operation != null), but when we would like update multiple values (changeset != null) , we have no response, batch is pending.

Instead, data are always updated in the database with EF6.

We put the lastet update, but no change.

This payload work:

--batch_id-1622205634979-23 Content-Type:application/http Content-Transfer-Encoding:binary

PATCH user_list(16) HTTP/1.1 Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true Accept-Language:fr-FR Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true

{"active":false} --batch_id-1622205634979-23-- Group ID (API): user_listGroup

This does not send response:

--batch_id-1622200586786-21 Content-Type: multipart/mixed;boundary=changeset_id-1622200586786-22

--changeset_id-1622200586786-22 Content-Type:application/http Content-Transfer-Encoding:binary Content-ID:0.0

PATCH user_list(16) HTTP/1.1 Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true Accept-Language:fr-FR Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true

{"active":false} --changeset_id-1622200586786-22 Content-Type:application/http Content-Transfer-Encoding:binary Content-ID:1.0

PATCH user_list(17) HTTP/1.1 Accept:application/json;odata.metadata=minimal;IEEE754Compatible=true Accept-Language:fr-FR Content-Type:application/json;charset=UTF-8;IEEE754Compatible=true

{"active":true} --changeset_id-1622200586786-22-- --batch_id-1622200586786-21-- Group ID (API): user_listGroup

Hope you can help us to solve this issue.

Kind regards guys, and congrat for this good job !