我们计划在 SAP-Successfactor 的休息请求下使用,它在 Body 中一次发送批量请求
请在下面找到示例:
OData API POST 请求: https://<>/odata/v2/$batch
身体开始:
--batch_36522ad7-fc75-4b56-8c71-56071383e77b
Content-Type: application/http
Content-Transfer-Encoding: binary
GET getUsersByDynamicGroup?groupId=6119L&$format=json HTTP/1.1
Content-Type: application/json;charset=UTF-8
--batch_36522ad7-fc75-4b56-8c71-56071383e77b
Content-Type: application/http
Content-Transfer-Encoding: binary
GET getUsersByDynamicGroup?groupId=6000L&$format=json HTTP/1.1
Content-Type: application/json;charset=UTF-8
--batch_36522ad7-fc75-4b56-8c71-56071383e77b
Content-Type: application/http
Content-Transfer-Encoding: binary
GET getUsersByDynamicGroup?groupId=1588L&$format=json HTTP/1.1
Content-Type: application/json;charset=UTF-8
--batch_36522ad7-fc75-4b56-8c71-56071383e77b
Content-Type: application/http
Content-Transfer-Encoding: binary
GET getUsersByDynamicGroup?groupId=1234L&$format=json HTTP/1.1
Content-Type: application/json;charset=UTF-8
--batch_36522ad7-fc75-4b56-8c71-56071383e77b
Content-Type: application/http
Content-Transfer-Encoding: binary
GET getUsersByDynamicGroup?groupId=123L&$format=json HTTP/1.1
Content-Type: application/json;charset=UTF-8
--batch_36522ad7-fc75-4b56-8c71-56071383e77b--
车身末端:
身体反应:
--batch_c96b193b-b98c-4a4b-b479-696536f72239
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
Content-Length: 133
{
"d" : [
{
"firstName" : "Automation", "lastName" : "User9", "middleName" : "Test", "userId" : "103272", "userName" : "103272"
}
]
}
--batch_c96b193b-b98c-4a4b-b479-696536f72239
Content-Type: application/http
Content-Transfer-Encoding: binary
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
DataServiceVersion: 1.0
Content-Length: 127
{
"d" : [
{
"firstName" : "Ava", "lastName" : "Johnston", "middleName" : null, "userId" : "ajohnston", "userName" : "Ava"
}
]
}
当我们在 Post 中发送请求时,我知道它是安全的,但我仍然只是在想这样做是安全的吗?
请忽略我,我在问一些基本问题。
如果您对此有什么要分享的,请赐教。