请求小程序直播接口商品添加并提审接口,content-type已经设置为json,goodsInfo内容为
{
"coverImgUrl": "SNAb1FiIdtvvkw8ZR3Ws2E4S8di5whffhroASSdr5sI",
"name": "香辣牛肉",
"priceType": 1,
"price": 44.0,
"url": "pages/index/index",
"thirdPartyAppid": “”
}
发送请求以后一直报错
{{
"errmsg": "url must not be empty rid: 61cd2509-2d3b45f0-4af77797",
"errcode": 200002
}}
url参数明明有值,里面也没有http的url,不用encode,为什么还报url为空?
结帖,这里问题出现在封装数据上面,C#,直接用的JObject封装的,貌似不行,自己拼接了一下就可以了 "{\"goodsInfo\": {\"coverImgUrl\":\""+ product.wxCoverImgUrlMediaId + "\",\"name\":\""+ product.wxName + "\",\"url\":\""+product.wxUrl+"\",\"priceType\":\""+ ToolHelper.GetInt(product.priceType) + "\",\"price\":\""+ ToolHelper.GetDecimal(product.price) + "\"}}";