提问人:Jijo Joseph 提问时间:3/24/2023 最后编辑:SuncatcherJijo Joseph 更新时间:8/22/2023 访问量:288
ODATA 将 etag 从响应传递到请求
ODATA pass etag from response to request
问:
我正在研究SAP集成,其中一个事务需要多个GET,PATCH和POST。此外,还需要在调用之间传递 etag。我正在尝试$batch但不知道如何在调用之间传递 etag,因为对实体的一次修改会更改 etag。这就是我尝试过的。
Content-Type: multipart/mixed;boundary=changeset_01
GET A_OutbDeliveryHeader(DeliveryDocument='0000000001') HTTP/1.1
sap-context-accept: header
Content-Type: application/json
Accept: application/json
Content-ID: C1
--changeset_01
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH A_OutbDeliveryItem(DeliveryDocument='0000000001',DeliveryDocumentItem='10') HTTP/1.1
sap-context-accept: header
Content-Type: application/json
Accept: application/json
Content-ID: C2
If-Match: xxxxx
{
"ActualDeliveryQuantity": "2.000"
}
--changeset_01
Content-Type: application/http
Content-Transfer-Encoding: binary
PATCH A_OutbDeliveryHeader(DeliveryDocument='0000000001') HTTP/1.1
sap-context-accept: header
Content-Type: application/json
Accept: application/json
Content-ID: C3
If-Match: xxxxx
{
"ActualGoodsMovementDate": "2023-03-14T13:33:10",
"ActualGoodsMovementTime": "PT13H33M10S"
}
GET A_OutbDeliveryHeader(DeliveryDocument='0000000001') HTTP/1.1
sap-context-accept: header
Content-Type: application/json
Accept: application/json
Content-ID: C4
--changeset_01
Content-Type: application/http
Content-Transfer-Encoding: binary
POST PostGoodsIssue?DeliveryDocument='0000000001' HTTP/1.1
sap-context-accept: header
Content-Type: application/json
Accept: application/json
Content-ID: C5
If-Match: xxxxx
--changeset_01--
--batch_01--
答: 暂无答案
评论