simple-odata-client / Simple.OData.Client

MIT License
331 stars 197 forks source link

Possibility of BATCH request with different URIs #545

Open b0raG opened 6 years ago

b0raG commented 6 years ago

Is it supported to perform a batch request with different URIs? Basically different Request URI for the URIs in the Request Body For example: POST http://servicemain/Births/$batch HTTP HTTP/1.1 BODY: --batch_ac1a28ee-9c2a-4c49-8efb-dd32d1385c3d Content-Type: multipart/mixed; boundary=changeset_7b4f682e-cf69-47f3-b5ed-97f6295357c3

--changeset_7b4f682e-cf69-47f3-b5ed-97f6295357c3 Content-Type: application/http Content-Transfer-Encoding: binary Content-ID: 1

POST subservice/PaymentDetails HTTP/1.1 Content-ID: 1 Prefer: return=representation OData-Version: 4.0 Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8

--changeset_7b4f682e-cf69-47f3-b5ed-97f6295357c3 Content-Type: application/http Content-Transfer-Encoding: binary Content-ID: 2 POST subservice/PaymentDetailsAmounts HTTP/1.1 Content-ID: 2 Prefer: return=representation OData-Version: 4.0 Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8 --changeset_7b4f682e-cf69-47f3-b5ed-97f6295357c3-- --batch_ac1a28ee-9c2a-4c49-8efb-dd32d1385c3d--
object commented 5 years ago

Not as I know. The library uses internal Microsoft OData stack, so we don't write the payload details ourselves, it's all done via OData lib API which doesn't give control for low level field values.