V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
anzu
V2EX  ›  微信

微信小程序发送 DELETE 请求时能把 data 转换成 query string 放入 URI 吗?

  •  
  •   anzu · Jun 25, 2019 · 3221 views
    This topic created in 2504 days ago, the information mentioned may be changed or developed.
    微信文档
    https://developers.weixin.qq.com/miniprogram/dev/api/network/request/wx.request.html

    Is an entity body allowed for an HTTP DELETE request?
    https://stackoverflow.com/questions/299628/is-an-entity-body-allowed-for-an-http-delete-request

    在发送 delete 请求时,对于 request 中包含有 entity-body 的情况,会被一些后端框架忽略,导致无法获取到查询参数。

    目前暂时的解决办法是手工拼接 URI。
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2372 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 10:55 · PVG 18:55 · LAX 03:55 · JFK 06:55
    ♥ Do have faith in what you're doing.