客户端发送pos请求调用云对象中的方法,参数在body中,我在云对象的方法中应该怎么获取body中的参数呢,云对象的方法参数是 {} 的,如图
请求入参: {
"args": {
"path": "/hasRegistered",
"httpMethod": "POST",
"headers": {
"content-length": "37",
"cookie": "acw_tc=2760826a16632364542188021ed21df8e46a10142a9c01f57a58f81c78575a",
"x5-uuid": "d5870fd5d72c04e781d5a4214aa2c8ac",
"x-client-ip": "1.202.246.19",
"x-forwarded-for": "1.202.246.19, 39.96.130.106",
"accept": "*/*",
"x-unity-version": "2021.3.7f1c1",
"x-real-ip": "1.202.246.19",
"host": "52046be3-56b9-4b9f-b4fb-3d559c9620c3.bspapp.com",
"content-type": "application/x-www-form-urlencoded",
"x-forwarded-by": "172.20.1.138:80",
"accept-encoding": "deflate, gzip",
"user-agent": "UnityPlayer/2021.3.7f1c1 (UnityWebRequest/1.0, libcurl/7.80.0-DEV)"
},
"queryStringParameters": {},
"isBase64Encoded": false,
"body": "username=ffffffssssss"
},
"requestId": "ac14018a1663236581413198904"
}
[co_user/ac14018a1663236581413198904/73ms/DEBUG] {}
1 个回复
最佳回复
DCloud_uniCloud_WYQ
this.getHttpInfo()