gpt4 book ai didi

java - REST API 用于使用值作为 json 的表单

转载 作者:太空宇宙 更新时间:2023-11-04 11:25:58 25 4
gpt4 key购买 nike

我们的 REST API 使用 Content-Type : application/x-www-form-urlencoded 作为输入。该请求包含值为 JSON 的表单参数。例如。

URI :  /abc/id   
Request Body :
param1 : {"name":"vineet", "age" : "9"} --JSON
param2 : {"city":"delhi","state":"delhi"} --JSON

但是当输入映射到请求对象时,值将变为

        param1 : {name : vineet, age : 9},
param2 : {city : delhi,state : delhi}

缺少引用。所以它是无效的 JSON。

最佳答案

关于java - REST API 用于使用值作为 json 的表单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44368196/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com