SAP Cloud SDK JavaScript URL编码ODATA筛选器(API_产品_SRV)
使用SAP Cloud SDK JavaScript(@SAP Cloud SDK/core版本1.26.1,@SAP/Cloud SDK vdm产品服务版本1.19.0)ODATA筛选器在URL查询部分中不进行百分比编码 示例:(假设存在描述为“äu description”的产品) 以下示例无法检索此产品说明:SAP Cloud SDK JavaScript URL编码ODATA筛选器(API_产品_SRV),javascript,typescript,urlencode,sap-cloud-sdk,Javascript,Typescript,Urlencode,Sap Cloud Sdk,使用SAP Cloud SDK JavaScript(@SAP Cloud SDK/core版本1.26.1,@SAP/Cloud SDK vdm产品服务版本1.19.0)ODATA筛选器在URL查询部分中不进行百分比编码 示例:(假设存在描述为“äu description”的产品) 以下示例无法检索此产品说明: const term = 'ä_description'; const destination = getDestinationInformation(); //get destin
const term = 'ä_description';
const destination = getDestinationInformation(); //get destination information from somewhere
const results = await ProductDescription.requestBuilder()
.getAll()
.filter(ProductDescription.PRODUCT_DESCRIPTION.equals(term))
.execute(destination);
此代码段生成以下请求URL:
"https://<host>/sap/opu/odata/sap/API_PRODUCT_SRV/A_ProductDescription?$format=json&$filter=(ProductDescription eq 'ä_description')"
这将返回预期的结果
我还没有检查,但这可能会影响其他VDM软件包
SDK本身还是SDK用户应该执行URL编码?我想避免双重编码
提前感谢,
ujj上周发布了这个版本。SDK处理此版本的url编码。请试一试。请参阅发行说明。感谢您提出此问题!编码应该作为SDK的一部分进行,SDK被添加到backlog中。一旦我们完成改进,我会告诉你的。
"https://<host>/sap/opu/odata/sap/API_PRODUCT_SRV/A_ProductDescription?$format=json&$filter=(ProductDescription eq '%C3%A4_description')"