收藏
回答

request请求参数编码问题?

我调用了某个API,从开发者工具network中的header看到的是:

?page=0&size=6&sort=totalOrderNumber,DESC&query={%27giftType%27:{$in:[%27HONGBAO%27,%27PHONECARD%27,%27CELLULAR_DATA%27,%27GIFT%27,%27SPECIAL_GIFT%27,%27PRODUCT%27,%27GIFTCARD_RECHARGE%27,%27GIFTCARD%27]}}&timestamp=1577259589655



然而正确的是:

?page=0&size=6&sort=totalOrderNumber,DESC&query=%22%7B'giftType'%3A%7B%24in%3A%5B'HONGBAO'%2C'PHONECARD'%2C'CELLULAR_DATA'%2C'GIFT'%2C'SPECIAL_GIFT'%2C'PRODUCT'%2C'GIFTCARD_RECHARGE'%2C'GIFTCARD'%5D%7D%7D%22&timestamp=1577259589655


这两者的差异是对url的encode出了问题。请问这个是不是开发者工具的bug?


@官方

回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容
问题标签