s4sdk - 使用 ODataQueryBuilder 或 VDM 的 OData $batch 请求
问题描述
有没有办法使用 ODataQueryBuilder 或 VDM 生成的类发送 OData 批处理请求?
例子:
假设我正在使用 Northwind 公共 OData 服务 ( https://services.odata.org/V2/Northwind/Northwind.svc/ )
由于网络性能的原因,我想在一个请求中查询客户、类别和区域,如下所示:
网址:https ://services.odata.org/V2/Northwind/Northwind.svc/ $batch
--batch_8008-578f-c3c1
Content-Type: application/http
Content-Transfer-Encoding: binary
GET Customers HTTP/1.1
Accept: application/json
Accept-Language: en
DataServiceVersion: 2.0
MaxDataServiceVersion: 2.0
--batch_8008-578f-c3c1
Content-Type: application/http
Content-Transfer-Encoding: binary
GET Categories HTTP/1.1
Accept: application/json
Accept-Language: en
DataServiceVersion: 2.0
MaxDataServiceVersion: 2.0
--batch_8008-578f-c3c1
Content-Type: application/http
Content-Transfer-Encoding: binary
GET Regions HTTP/1.1
Accept: application/json
Accept-Language: en
DataServiceVersion: 2.0
MaxDataServiceVersion: 2.0
--batch_8008-578f-c3c1--
(我在 Postman 中对此进行了测试,它有效。)
我在其他场景中这将非常有用,例如一次读取多个单独的条目,发送 ChangeSet 以更改“事务”中的多个条目,以及调用函数导入。
解决方案
此功能尚不支持,但当然完全有效。一旦有关于此问题的更新,我们将更新此问题。
推荐阅读
- python - 添加持续时间时的日期时间格式
- javascript - Angular 反应式表单 - 当子 FormGroup 更改时手动触发对父 FormGroup 的验证
- jquery - 模式显示在ajax调用后不起作用
- java - Oracle 表单(小程序)操作或 Oracle JVM Hook 的记录器
- android - java.lang.ClassCastException:在 Kotlin 中无法将 CustomAdapter 强制转换为 android.widget.ArrayAdapter
- html - 网格行间隙不应用百分比
- angular - Ag-grid Angular 2
- excel - SUMIFS 的动态 OR 标准
- c - 在 C 中有效地访问矩阵的列
- sorting - 我可以对一堆值进行排序而不保留字符串的实际内容吗?双键排序一个从本地另一个在云中